public class DefaultTypeFunction extends java.lang.Object implements TypeFunction
Modifier and Type | Field and Description |
---|---|
protected java.util.List<TypeFunction> |
otherFunctions |
Constructor and Description |
---|
DefaultTypeFunction() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate() |
graphql.schema.GraphQLType |
buildType(java.lang.String typeName,
java.lang.Class<?> aClass,
java.lang.reflect.AnnotatedType annotatedType)
Build a
GraphQLType object from a java type. |
boolean |
canBuildType(java.lang.Class<?> aClass,
java.lang.reflect.AnnotatedType annotatedType)
Get whether this builder handles the given type.
|
java.lang.String |
getTypeName(java.lang.Class<?> aClass,
java.lang.reflect.AnnotatedType annotatedType)
Get the graphql type name that will be used to build the type.
|
java.lang.Class<DefaultTypeFunction> |
register(TypeFunction function) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildType
protected java.util.List<TypeFunction> otherFunctions
public boolean canBuildType(java.lang.Class<?> aClass, java.lang.reflect.AnnotatedType annotatedType)
TypeFunction
canBuildType
in interface TypeFunction
aClass
- The java type to build the type name forannotatedType
- The AnnotatedType
of the java type, which may be a {link AnnotatedParameterizedType}protected void activate()
public java.lang.Class<DefaultTypeFunction> register(TypeFunction function)
public java.lang.String getTypeName(java.lang.Class<?> aClass, java.lang.reflect.AnnotatedType annotatedType)
TypeFunction
TypeFunction.buildType(java.lang.Class<?>, java.lang.reflect.AnnotatedType)
method when building the type.getTypeName
in interface TypeFunction
aClass
- The java type to build the type name forannotatedType
- The AnnotatedType
of the java type, which may be a {link AnnotatedParameterizedType}public graphql.schema.GraphQLType buildType(java.lang.String typeName, java.lang.Class<?> aClass, java.lang.reflect.AnnotatedType annotatedType)
TypeFunction
GraphQLType
object from a java type.buildType
in interface TypeFunction
typeName
- The name to give the graphql typeaClass
- The java type to build the type name forannotatedType
- The AnnotatedType
of the java type, which may be a {link AnnotatedParameterizedType}GraphQLType