Package graphql.schema.idl
Class TypeInfo
- java.lang.Object
-
- graphql.schema.idl.TypeInfo
-
public class TypeInfo extends java.lang.ObjectThis helper gives you access to the type info given a type definition
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends GraphQLType>
Tdecorate(GraphQLType objectType)This will decorate a graphql type with the original hierarchy of non null and list'ness it originally contained in its definition typebooleanequals(java.lang.Object o)static java.lang.StringgetAstDesc(Type type)java.lang.StringgetName()TypegetRawType()TypeNamegetTypeName()inthashCode()booleanisList()booleanisNonNull()booleanisPlain()TypeInforenameAs(java.lang.String newName)This will rename the type with the specified new name but will preserve the wrapping that was presentjava.lang.StringtoString()static TypeInfotypeInfo(Type type)TypeInfounwrapOne()TypeunwrapOneType()
-
-
-
Method Detail
-
getRawType
public Type getRawType()
-
getTypeName
public TypeName getTypeName()
-
getName
public java.lang.String getName()
-
isList
public boolean isList()
-
isNonNull
public boolean isNonNull()
-
isPlain
public boolean isPlain()
-
renameAs
public TypeInfo renameAs(java.lang.String newName)
This will rename the type with the specified new name but will preserve the wrapping that was present- Parameters:
newName- the new name of the type- Returns:
- a new type info rebuilt with the new name
-
decorate
public <T extends GraphQLType> T decorate(GraphQLType objectType)
This will decorate a graphql type with the original hierarchy of non null and list'ness it originally contained in its definition type- Type Parameters:
T- the type- Parameters:
objectType- this should be a graphql type that was originally built from this raw type- Returns:
- the decorated type
-
getAstDesc
public static java.lang.String getAstDesc(Type type)
-
unwrapOne
public TypeInfo unwrapOne()
-
unwrapOneType
public Type unwrapOneType()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-