@ThreadSafe public class ThriftCatalog extends java.lang.Object
Constructor and Description |
---|
ThriftCatalog() |
ThriftCatalog(MetadataErrors.Monitor monitor) |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultCoercions(java.lang.Class<?> coercionsClass)
Add the @ToThrift and @FromThrift coercions in the specified class to this catalog.
|
void |
addThriftType(ThriftType thriftType) |
TypeCoercion |
getDefaultCoercion(java.lang.reflect.Type type)
Gets the default TypeCoercion (and associated ThriftType) for the specified Java type.
|
static java.lang.Integer |
getMethodOrder(java.lang.reflect.Method method) |
static com.google.common.collect.ImmutableList<java.lang.String> |
getThriftDocumentation(java.lang.Class<?> objectClass) |
static <T extends java.lang.Enum<T>> |
getThriftDocumentation(java.lang.Enum<T> enumConstant) |
static com.google.common.collect.ImmutableList<java.lang.String> |
getThriftDocumentation(java.lang.reflect.Field field) |
static com.google.common.collect.ImmutableList<java.lang.String> |
getThriftDocumentation(java.lang.reflect.Method method) |
<T extends java.lang.Enum<T>> |
getThriftEnumMetadata(java.lang.Class<?> enumClass)
Gets the ThriftEnumMetadata for the specified enum class.
|
<T> ThriftStructMetadata |
getThriftStructMetadata(java.lang.reflect.Type structType)
Gets the ThriftStructMetadata for the specified struct class.
|
ThriftType |
getThriftType(java.lang.reflect.Type javaType)
Gets the ThriftType for the specified Java type.
|
boolean |
isSupportedArrayComponentType(java.lang.Class<?> componentType) |
boolean |
isSupportedStructFieldType(java.lang.reflect.Type javaType) |
public ThriftCatalog()
public ThriftCatalog(MetadataErrors.Monitor monitor)
public void addThriftType(ThriftType thriftType)
public void addDefaultCoercions(java.lang.Class<?> coercionsClass)
public TypeCoercion getDefaultCoercion(java.lang.reflect.Type type)
public ThriftType getThriftType(java.lang.reflect.Type javaType) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the Java Type can not be coerced to a ThriftTypepublic boolean isSupportedStructFieldType(java.lang.reflect.Type javaType)
public boolean isSupportedArrayComponentType(java.lang.Class<?> componentType)
public <T extends java.lang.Enum<T>> ThriftEnumMetadata<?> getThriftEnumMetadata(java.lang.Class<?> enumClass)
public <T> ThriftStructMetadata getThriftStructMetadata(java.lang.reflect.Type structType)
public static com.google.common.collect.ImmutableList<java.lang.String> getThriftDocumentation(java.lang.Class<?> objectClass)
public static com.google.common.collect.ImmutableList<java.lang.String> getThriftDocumentation(java.lang.reflect.Method method)
public static com.google.common.collect.ImmutableList<java.lang.String> getThriftDocumentation(java.lang.reflect.Field field)
public static <T extends java.lang.Enum<T>> com.google.common.collect.ImmutableList<java.lang.String> getThriftDocumentation(java.lang.Enum<T> enumConstant)
public static java.lang.Integer getMethodOrder(java.lang.reflect.Method method)
Copyright © 2019. All rights reserved.