@ThreadSafe public class ThriftCatalog extends Object
| Constructor and Description |
|---|
ThriftCatalog() |
ThriftCatalog(MetadataErrors.Monitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultCoercions(Class<?> coercionsClass)
Add the @ToThrift and @FromThrift coercions in the specified class to this catalog.
|
void |
addThriftType(ThriftType thriftType) |
ThriftTypeReference |
getCollectionElementThriftTypeReference(Type javaType) |
TypeCoercion |
getDefaultCoercion(Type type)
Gets the default TypeCoercion (and associated ThriftType) for the specified Java type.
|
ThriftTypeReference |
getFieldThriftTypeReference(io.airlift.drift.codec.metadata.FieldMetadata fieldMetadata) |
ThriftTypeReference |
getMapKeyThriftTypeReference(Type javaType) |
ThriftTypeReference |
getMapValueThriftTypeReference(Type javaType) |
static Integer |
getMethodOrder(Method method) |
ThriftTypeReference |
getOptionalThriftTypeReference(Type javaType) |
static com.google.common.collect.ImmutableList<String> |
getThriftDocumentation(Class<?> objectClass) |
static <T extends Enum<T>> |
getThriftDocumentation(Enum<T> enumConstant) |
static com.google.common.collect.ImmutableList<String> |
getThriftDocumentation(Field field) |
static com.google.common.collect.ImmutableList<String> |
getThriftDocumentation(Method method) |
<T extends Enum<T>> |
getThriftEnumMetadata(Class<?> enumClass)
Gets the ThriftEnumMetadata for the specified enum class.
|
ThriftProtocolType |
getThriftProtocolType(Type javaType) |
<T> ThriftStructMetadata |
getThriftStructMetadata(Type structType)
Gets the ThriftStructMetadata for the specified struct class.
|
ThriftType |
getThriftType(Type javaType)
Gets the ThriftType for the specified Java type.
|
ThriftType |
getThriftTypeFromCache(Type javaType) |
static boolean |
isStructType(Type javaType) |
boolean |
isSupportedArrayComponentType(Class<?> componentType) |
boolean |
isSupportedStructFieldType(Type javaType) |
public ThriftCatalog()
public ThriftCatalog(MetadataErrors.Monitor monitor)
public void addThriftType(ThriftType thriftType)
public void addDefaultCoercions(Class<?> coercionsClass)
public TypeCoercion getDefaultCoercion(Type type)
public ThriftType getThriftType(Type javaType) throws IllegalArgumentException
IllegalArgumentException - if the Java Type can not be coerced to a ThriftTypepublic ThriftType getThriftTypeFromCache(Type javaType)
public ThriftTypeReference getFieldThriftTypeReference(io.airlift.drift.codec.metadata.FieldMetadata fieldMetadata)
public ThriftTypeReference getCollectionElementThriftTypeReference(Type javaType)
public ThriftTypeReference getMapKeyThriftTypeReference(Type javaType)
public ThriftTypeReference getMapValueThriftTypeReference(Type javaType)
public ThriftTypeReference getOptionalThriftTypeReference(Type javaType)
public boolean isSupportedStructFieldType(Type javaType)
public ThriftProtocolType getThriftProtocolType(Type javaType)
public static boolean isStructType(Type javaType)
public boolean isSupportedArrayComponentType(Class<?> componentType)
public <T extends Enum<T>> ThriftEnumMetadata<?> getThriftEnumMetadata(Class<?> enumClass)
public <T> ThriftStructMetadata getThriftStructMetadata(Type structType)
public static com.google.common.collect.ImmutableList<String> getThriftDocumentation(Class<?> objectClass)
public static com.google.common.collect.ImmutableList<String> getThriftDocumentation(Method method)
public static com.google.common.collect.ImmutableList<String> getThriftDocumentation(Field field)
public static <T extends Enum<T>> com.google.common.collect.ImmutableList<String> getThriftDocumentation(Enum<T> enumConstant)
Copyright © 2012–2018. All rights reserved.