Class TypeInfo


  • public class TypeInfo
    extends java.lang.Object
    This helper gives you access to the type info given a type definition
    • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object