public class ThriftSchema extends java.lang.Object implements ThriftConstants
CONFIG_OPTION, CONFIG_OPTION_DESC, CONFIG_OPTION_LONG, CXX_HELPER, DIR_PERSERVICE, DIR_PERSTRUCT, DIR_SCHEMA, LANGUAGE_OPTION, LANGUAGE_OPTION_DESC, LANGUAGE_OPTION_LONG, SCHEMA_INFO, TASK_TYPE_OPTION, TASK_TYPE_OPTION_DESC, TASK_TYPE_OPTION_LONG, THRIFT_CLIENT_PKG_OPTION_DESC, THRIFT_CLIENT_PKG_OPTION_LONG| 构造器和说明 |
|---|
ThriftSchema(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> interfaceClasses) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
escapeField(java.lang.String name)
字段名转义,避免java,thrift关键字冲突
|
java.lang.String |
escapeThrift(java.lang.String name)
对thrift IDL 关键字(binary,list,map,set,i32...)转义,以确保生成的IDL文件中成员名和参数名与thrift关键字不冲突
|
java.lang.reflect.Type[] |
getActualTypeArguments(java.lang.reflect.Type type) |
java.util.List<ThriftStructDecorator> |
getAllStructDecorators() |
java.util.List<ThriftStructDecorator> |
getBeanDecorators() |
ThriftStructDecorator |
getDecoratorType(java.lang.reflect.Type type) |
java.util.List<ThriftStructDecorator> |
getEnumDecorators() |
java.util.List<ThriftStructDecorator> |
getExceptionDecorators() |
protected java.util.List<ThriftStructDecorator> |
getGenSequence(boolean thriftStructIncluded)
根据
ThriftStructDecorator对象之间的依赖关系返回ThriftStructDecorator队列 |
java.lang.Class<?> |
getServiceRuntimeExceptionClass() |
com.google.common.collect.ListMultimap<java.lang.String,java.util.Collection<ThriftStructDecorator>> |
getStructGenSequenceAsMultimap(boolean thriftStructIncluded)
根据
ThriftStructDecorator对象之间的依赖关系返回以package为key的 ListMultimap映射 |
java.util.List<ThriftServiceDecorator<?>> |
getThriftServiceDecorators() |
java.util.List<ThriftStructDecorator> |
getThriftStructDecorator(java.lang.String pkg)
返回指定包名下的所有
ThriftStructDecorator对象,,按类名自然排序,没有找到则返回空表 |
java.lang.Class<?> |
getTypeTransformerClass() |
boolean |
isArray(java.lang.reflect.Type type) |
boolean |
isBinary(java.lang.reflect.Type type) |
boolean |
isCanMove(CxxType cxxType) |
boolean |
isCastType(java.lang.reflect.Type type) |
boolean |
isCollection(java.lang.reflect.Type type) |
boolean |
isDecoratorType(java.lang.reflect.Type type) |
boolean |
isfloat(java.lang.reflect.Type type) |
static boolean |
isIsLocalMethod(java.lang.reflect.Method method) |
static boolean |
isIsLocalMethod(Method method) |
boolean |
isList(java.lang.reflect.Type type) |
boolean |
isMap(java.lang.reflect.Type type) |
boolean |
isPrimitiveArray(java.lang.reflect.Type type) |
boolean |
isPrimitivefloat(java.lang.reflect.Type type) |
boolean |
isSet(java.lang.reflect.Type type) |
boolean |
isThriftBuildinType(java.lang.reflect.Type type) |
boolean |
isThriftStruct(java.lang.reflect.Type type) |
boolean |
isUseExceptionInTypes() |
boolean |
isUseMapInTypes() |
boolean |
isUseSetInTypes() |
boolean |
isUseStringInTypes() |
boolean |
isUseVectorInTypes() |
java.lang.String |
toStubCxxType(java.lang.Class<?> clazz) |
java.lang.String |
toStubType(java.lang.Class<?> clazz) |
java.lang.reflect.Type |
wrap(java.lang.reflect.Type type) |
public ThriftSchema(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> interfaceClasses)
public java.util.List<ThriftStructDecorator> getAllStructDecorators()
public java.util.List<ThriftStructDecorator> getExceptionDecorators()
public java.util.List<ThriftStructDecorator> getEnumDecorators()
public java.util.List<ThriftStructDecorator> getBeanDecorators()
public java.util.List<ThriftServiceDecorator<?>> getThriftServiceDecorators()
public boolean isThriftBuildinType(java.lang.reflect.Type type)
public boolean isCastType(java.lang.reflect.Type type)
public boolean isDecoratorType(java.lang.reflect.Type type)
public ThriftStructDecorator getDecoratorType(java.lang.reflect.Type type)
public boolean isThriftStruct(java.lang.reflect.Type type)
public boolean isPrimitivefloat(java.lang.reflect.Type type)
public boolean isfloat(java.lang.reflect.Type type)
public boolean isPrimitiveArray(java.lang.reflect.Type type)
public boolean isMap(java.lang.reflect.Type type)
public boolean isList(java.lang.reflect.Type type)
public boolean isSet(java.lang.reflect.Type type)
public boolean isCollection(java.lang.reflect.Type type)
public boolean isArray(java.lang.reflect.Type type)
public boolean isBinary(java.lang.reflect.Type type)
public final java.lang.reflect.Type wrap(java.lang.reflect.Type type)
public java.lang.String escapeThrift(java.lang.String name)
name - public java.lang.String escapeField(java.lang.String name)
name - public static boolean isIsLocalMethod(java.lang.reflect.Method method)
public static boolean isIsLocalMethod(Method method)
public java.lang.reflect.Type[] getActualTypeArguments(java.lang.reflect.Type type)
public java.lang.Class<?> getServiceRuntimeExceptionClass()
public java.lang.Class<?> getTypeTransformerClass()
public java.lang.String toStubType(java.lang.Class<?> clazz)
public java.lang.String toStubCxxType(java.lang.Class<?> clazz)
public java.util.List<ThriftStructDecorator> getThriftStructDecorator(java.lang.String pkg)
ThriftStructDecorator对象,,按类名自然排序,没有找到则返回空表pkg - protected java.util.List<ThriftStructDecorator> getGenSequence(boolean thriftStructIncluded)
ThriftStructDecorator对象之间的依赖关系返回ThriftStructDecorator队列thriftStructIncluded - 是否包含thrift struct 类public com.google.common.collect.ListMultimap<java.lang.String,java.util.Collection<ThriftStructDecorator>> getStructGenSequenceAsMultimap(boolean thriftStructIncluded)
ThriftStructDecorator对象之间的依赖关系返回以package为key的 ListMultimap映射thriftStructIncluded - 是否包含thrift struct 类public boolean isUseStringInTypes()
public boolean isUseMapInTypes()
public boolean isUseSetInTypes()
public boolean isUseVectorInTypes()
public boolean isUseExceptionInTypes()
Copyright © 2020. All Rights Reserved.