com.github.kongchen.swagger.docgen.util
类 Utils

java.lang.Object
  继承者 com.github.kongchen.swagger.docgen.util.Utils

public class Utils
extends Object

Created with IntelliJ IDEA. User: kongchen Date: 1/21/14


构造方法摘要
Utils()
           
 
方法摘要
static String allowableValuesToString(com.wordnik.swagger.model.AllowableValues allowableValues)
           
static String createResourceKey(String resourceName, String version)
          Create a resource key from name and version
static JAllowableValues getAllowableValuesFromJsonNode(com.fasterxml.jackson.databind.JsonNode node)
           
static boolean getBooleanFromJsonNode(com.fasterxml.jackson.databind.JsonNode node, String key)
           
static
<T> scala.Option<T>
getOption(T t)
           
static String getStringFromJsonNode(com.fasterxml.jackson.databind.JsonNode node, String key)
           
static String getStrInOption(scala.Option<String> scalaStr)
           
static String parseResourceName(Class<?> clazz)
          Get resource name from controller class
static String parseResourceName(String mapping)
          Get resource name from request mapping string
static String parseVersion(String mapping)
           
static
<T> scala.collection.immutable.List<T>
toScalaImmutableList(List<T> list)
          uncheck*
static
<A,B> scala.collection.immutable.Map<A,B>
toScalaImmutableMap(HashMap<A,B> m)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Utils

public Utils()
方法详细信息

getStrInOption

public static String getStrInOption(scala.Option<String> scalaStr)

getOption

public static <T> scala.Option<T> getOption(T t)

allowableValuesToString

public static String allowableValuesToString(com.wordnik.swagger.model.AllowableValues allowableValues)

toScalaImmutableMap

public static <A,B> scala.collection.immutable.Map<A,B> toScalaImmutableMap(HashMap<A,B> m)

toScalaImmutableList

public static <T> scala.collection.immutable.List<T> toScalaImmutableList(List<T> list)
uncheck*


getAllowableValuesFromJsonNode

public static JAllowableValues getAllowableValuesFromJsonNode(com.fasterxml.jackson.databind.JsonNode node)

getStringFromJsonNode

public static String getStringFromJsonNode(com.fasterxml.jackson.databind.JsonNode node,
                                           String key)

getBooleanFromJsonNode

public static boolean getBooleanFromJsonNode(com.fasterxml.jackson.databind.JsonNode node,
                                             String key)

parseVersion

public static String parseVersion(String mapping)
参数:
mapping -
返回:
version of resource

parseResourceName

public static String parseResourceName(String mapping)
Get resource name from request mapping string

参数:
mapping -
返回:
name of resource

parseResourceName

public static String parseResourceName(Class<?> clazz)
Get resource name from controller class

参数:
clazz -
返回:

createResourceKey

public static String createResourceKey(String resourceName,
                                       String version)
Create a resource key from name and version

参数:
resourceName -
version -
返回:


Copyright © 2015. All Rights Reserved.