@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) |
TypeCoercion |
getDefaultCoercion(Type type)
Gets the default TypeCoercion (and associated ThriftType) for the specified Java type.
|
static Integer |
getMethodOrder(Method method) |
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.
|
<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.
|
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 boolean isSupportedStructFieldType(Type javaType)
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–2014 Facebook, Inc.. All rights reserved.