public class ThriftSchema extends java.lang.Object implements ThriftConstants
COMMON_TYPES_OPTION_DESC, COMMON_TYPES_OPTION_LONG, CONFIG_OPTION, CONFIG_OPTION_DESC, CONFIG_OPTION_LONG, CXX_HELPER, DIR_PERSERVICE, DIR_PERSTRUCT, DIR_SCHEMA, ERPC_BINARY_OUTPUT_SIZE_OPTION_DESC, ERPC_BINARY_OUTPUT_SIZE_OPTION_LONG, ERPC_DEFAULT_MAX_LENGTH_OPTION_DESC, ERPC_DEFAULT_MAX_LENGTH_OPTION_LONG, ERPC_ERRMSG_MAX_LENGTH_OPTION_DESC, ERPC_ERRMSG_MAX_LENGTH_OPTION_LONG, ERPC_FORWARD_PORT_OPTION_DESC, ERPC_FORWARD_PORT_OPTION_LONG, ERPC_PORT_PREFIX_OPTION_DESC, ERPC_PORT_PREFIX_OPTION_LONG, ERPC_PROGRAM_OPTION_DESC, ERPC_PROGRAM_OPTION_LONG, ERPC_PROXY_PORT_OPTION_DESC, ERPC_PROXY_PORT_OPTION_LONG, EXCLUDE_FIELDS_OPTION_DESC, EXCLUDE_FIELDS_OPTION_LONG, EXCLUDE_METHODS_OPTION_DESC, EXCLUDE_METHODS_OPTION_LONG, INCLUDE_METHODS_OPTION_DESC, INCLUDE_METHODS_OPTION_LONG, LANGUAGE_OPTION, LANGUAGE_OPTION_DESC, LANGUAGE_OPTION_LONG, SCHEMA_INFO, TAGS_OPTION_DESC, TAGS_OPTION_LONG, TASK_TYPE_OPTION, TASK_TYPE_OPTION_DESC, TASK_TYPE_OPTION_LONG, THRIFT_CLIENT_PKG_OPTION_DESC, THRIFT_CLIENT_PKG_OPTION_LONG, THRIFT_SERVICE_CLASS_OPTION_DESC, THRIFT_SERVICE_CLASS_OPTION_LONG| 构造器和说明 |
|---|
ThriftSchema(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> interfaceClasses) |
| 限定符和类型 | 方法和说明 |
|---|---|
ThriftSchema |
erpcProxyInit() |
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() |
int |
getBinaryOutputSize() |
java.util.List<com.facebook.swift.codec.metadata.ErpcType> |
getCollectionStructs() |
java.util.List<com.facebook.swift.codec.metadata.ErpcType> |
getCollectionStructs(boolean structElement) |
ThriftStructDecorator |
getDecoratorType(java.lang.reflect.Type type) |
int |
getDefaultMaxLength() |
java.util.List<ThriftStructDecorator> |
getEnumDecorators() |
int |
getErpcForwardPort() |
int |
getErpcProxyPort() |
int |
getErrmsgMaxLength() |
java.util.List<ThriftStructDecorator> |
getExceptionDecorators() |
int |
getExistsListBinary() |
int |
getExistsListString() |
protected java.util.List<ThriftStructDecorator> |
getGenSequence(boolean thriftStructIncluded)
根据
ThriftStructDecorator对象之间的依赖关系返回ThriftStructDecorator队列 |
java.lang.String |
getPortPrefix() |
java.lang.String |
getProgramName() |
java.lang.Class<?> |
getServiceRuntimeExceptionClass() |
com.google.common.collect.ListMultimap<java.lang.String,java.util.Collection<ThriftStructDecorator>> |
getStructGenSequenceAsMultimap(boolean thriftStructIncluded)
根据
ThriftStructDecorator对象之间的依赖关系返回以package为key的 ListMultimap映射 |
com.facebook.swift.codec.metadata.DecoratorThriftEnumMetadata<?> |
getThriftEnumMetadata(java.lang.String className) |
com.facebook.swift.codec.metadata.DecoratorThriftEnumMetadata<?> |
getThriftEnumMetadata(java.lang.reflect.Type type) |
java.util.List<ThriftServiceDecorator<?>> |
getThriftServiceDecorators() |
java.util.List<ThriftStructDecorator> |
getThriftStructDecorator(java.lang.String pkg)
返回指定包名下的所有
ThriftStructDecorator对象,,按类名自然排序,没有找到则返回空表 |
com.facebook.swift.codec.metadata.DecoratorThriftStructMetadata |
getThriftStructMetadata(java.lang.String className) |
com.facebook.swift.codec.metadata.DecoratorThriftStructMetadata |
getThriftStructMetadata(java.lang.reflect.Type type) |
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 |
isCommonType(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 |
isUseBinaryInServices() |
boolean |
isUseBinaryInTypes() |
boolean |
isUseExceptionInTypes() |
boolean |
isUseMapInTypes() |
boolean |
isUseSetInTypes() |
boolean |
isUseStringInServices() |
boolean |
isUseStringInTypes() |
boolean |
isUseVectorInTypes() |
ThriftSchema |
setThriftServiceClasses(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> thriftServiceClasses) |
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 isUseStringInServices()
public boolean isUseBinaryInServices()
public boolean isUseStringInTypes()
public boolean isUseBinaryInTypes()
public boolean isUseMapInTypes()
public boolean isUseSetInTypes()
public boolean isUseVectorInTypes()
public boolean isUseExceptionInTypes()
public boolean isCommonType(java.lang.reflect.Type type)
public java.lang.String getProgramName()
public java.lang.String getPortPrefix()
public ThriftSchema setThriftServiceClasses(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> thriftServiceClasses)
thriftServiceClasses - 要设置的 thriftServiceClassespublic com.facebook.swift.codec.metadata.DecoratorThriftEnumMetadata<?> getThriftEnumMetadata(java.lang.reflect.Type type)
public com.facebook.swift.codec.metadata.DecoratorThriftEnumMetadata<?> getThriftEnumMetadata(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic com.facebook.swift.codec.metadata.DecoratorThriftStructMetadata getThriftStructMetadata(java.lang.reflect.Type type)
public com.facebook.swift.codec.metadata.DecoratorThriftStructMetadata getThriftStructMetadata(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic java.util.List<com.facebook.swift.codec.metadata.ErpcType> getCollectionStructs()
public java.util.List<com.facebook.swift.codec.metadata.ErpcType> getCollectionStructs(boolean structElement)
public int getExistsListString()
public int getExistsListBinary()
public ThriftSchema erpcProxyInit()
public int getErpcForwardPort()
public int getErpcProxyPort()
public int getDefaultMaxLength()
public int getErrmsgMaxLength()
public int getBinaryOutputSize()
Copyright © 2020. All Rights Reserved.