Interface JType

    • Method Detail

      • getErasedType

        JType getErasedType()
        Returns this type with no type parameters or type variables. See the JLS Third Edition section on Type Erasure.
      • getJNISignature

        java.lang.String getJNISignature()
        Returns the "field descriptor" for a type as specified by the Java Virtual Machine Specification. Examples:
        • boolean = Z
        • byte[] = [B
        • java.lang.String = Ljava/lang/String;
      • getLeafType

        JType getLeafType()
        For array types, recursively looks for the element type that is not an array. Otherwise, returns this type.
      • getParameterizedQualifiedSourceName

        java.lang.String getParameterizedQualifiedSourceName()
        Returns a type name as it would be specified in Java source, with the package name included. Includes the type parameters. If called on a type parameter, does not include any bounds. For example, a type Foo declared in com.example would be given as "com.example.Foo", while the same type instantiated with Baz would be "com.example.Foo".
      • getQualifiedSourceName

        java.lang.String getQualifiedSourceName()
        Returns a type name as it would be specified in Java source, with the package name included. Does not include the type parameters. If called on a type parameter, includes any bounds.
      • getSimpleSourceName

        java.lang.String getSimpleSourceName()
        Returns the name of this class without the package name or enclosing class name.
      • isClass

        JClassType isClass()
        Returns this instance if the erased version of this type is a class (as opposed to a primitive, array, or interface) or null if it is not.
      • isClassOrInterface

        JClassType isClassOrInterface()
        Returns this instance if the erased version of this type is a class or interface (as opposed to a primitive or array array) or null if it is not.
      • isEnum

        JEnumType isEnum()
        Returns this instance if it is an enumeration or null if it is not.
      • isGenericType

        JGenericType isGenericType()
        Returns this instance if it is a real class that has type parameters or null if it is not.
      • isInterface

        JClassType isInterface()
        Returns this instance if it is an interface or null if it is not.
      • isRawType

        JRawType isRawType()
        Returns the raw type if this is a JRawType, otherwise returns null.