Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.core.ext.typeinfo
Class JClassType

    java.lang.Object
      com.google.gwt.core.ext.typeinfo.JType
          com.google.gwt.core.ext.typeinfo.JClassType

All Implemented Interfaces:
  HasAnnotations, HasMetaData

Direct Known Subclasses:
  JArrayType, JParameterizedType, JRawType, JRealClassType, JTypeParameter, JWildcardType

    public abstract class JClassType

extends JType
implements HasAnnotations, HasMetaData

Type used to represent any non-primitive type.

Constructor Summary
`JClassType()`

Method Summary
`protected abstract void` | `acceptSubtype(JClassType me)`
`abstract void` | `addImplementedInterface(JClassType intf)`
`abstract void` | `addMetaData(java.lang.String tagName, java.lang.String[] values)` Adds additional metadata.
`abstract void` | `addModifierBits(int bits)`
`JParameterizedType` | `asParameterizationOf(JGenericType type)`
`abstract JConstructor` | `findConstructor(JType[] paramTypes)`
`abstract JField` | `findField(java.lang.String name)`
`abstract JMethod` | `findMethod(java.lang.String name, JType[] paramTypes)`
`abstract JClassType` | `findNestedType(java.lang.String typeName)`
`abstract
`<T extends java.lang.annotation.Annotation> T`
` | `getAnnotation(java.lang.Class<T> annotationClass)` Returns an instance of the specified annotation type if it is present on this element or `null` if it is not.
`abstract JConstructor` | `getConstructor(JType[] paramTypes)`
`abstract JConstructor[]` | `getConstructors()`
`abstract JClassType` | `getEnclosingType()`
`abstract JClassType` | `getErasedType()`
`abstract JField` | `getField(java.lang.String name)`
`abstract JField[]` | `getFields()`
`protected static java.util.Set<JClassType>` | `getFlattenedSuperTypeHierarchy(JClassType type)` Returns all of the superclasses and superinterfaces for a given type including the type itself.
`abstract JClassType[]` | `getImplementedInterfaces()`
`abstract java.lang.String[][]` | `getMetaData(java.lang.String tagName)` Gets each list of metadata for the specified tag name.
`abstract java.lang.String[]` | `getMetaDataTags()` Gets the name of available metadata tags.
`abstract JMethod` | `getMethod(java.lang.String name, JType[] paramTypes)`
`abstract JMethod[]` | `getMethods()`
`protected abstract int` | `getModifierBits()`
`abstract java.lang.String` | `getName()`
`abstract JClassType` | `getNestedType(java.lang.String typeName)`
`abstract JClassType[]` | `getNestedTypes()`
`abstract TypeOracle` | `getOracle()`
`abstract JMethod[]` | `getOverloads(java.lang.String name)`
`abstract JMethod[]` | `getOverridableMethods()` Iterates over the most-derived declaration of each unique overridable method available in the type hierarchy of the specified type, including those found in superclasses and superinterfaces.
`protected abstract void` | `getOverridableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)`
`protected abstract void` | `getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)` Gets the methods declared in interfaces that this type extends.
`abstract JPackage` | `getPackage()`
`abstract JClassType[]` | `getSubtypes()`
`abstract JClassType` | `getSuperclass()`
`abstract boolean` | `isAbstract()`
`abstract boolean` | `isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)` Returns `true` if this item has an annotation of the specified type.
`boolean` | `isAssignableFrom(JClassType possibleSubtype)` Returns `true` if this `JClassType` is assignable from the specified `JClassType` parameter.
`boolean` | `isAssignableTo(JClassType possibleSupertype)` Returns `true` if this `JClassType` is assignable to the specified `JClassType` parameter.
`abstract boolean` | `isDefaultInstantiable()` Determines if the class can be constructed using a simple `new` operation.
`abstract boolean` | `isFinal()`
`abstract JGenericType` | `isGenericType()`
`abstract JClassType` | `isInterface()`
`abstract boolean` | `isLocalType()` Tests if this type is a local type (within a method).
`protected com.google.gwt.core.ext.typeinfo.JMaybeParameterizedType` | `isMaybeParameterizedType()`
`abstract boolean` | `isMemberType()` Tests if this type is contained within another type.
`abstract boolean` | `isPrivate()`
`abstract boolean` | `isProtected()`
`abstract boolean` | `isPublic()`
`abstract boolean` | `isStatic()`
`protected java.lang.String` | `makeCompoundName(JClassType type)`
`protected abstract void` | `notifySuperTypesOf(JClassType me)` Tells this type's superclasses and superinterfaces about it.
`protected abstract void` | `removeSubtype(JClassType me)`
`abstract void` | `setSuperclass(JClassType type)`
`java.lang.String` | `toString()`

Methods inherited from class com.google.gwt.core.ext.typeinfo.JType
`getJNISignature, getLeafType, getParameterizedQualifiedSourceName, getQualifiedSourceName, getSimpleSourceName, isAnnotation, isArray, isClass, isClassOrInterface, isEnum, isParameterized, isPrimitive, isRawType, isTypeParameter, isWildcard`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JClassType

    public JClassType()

Method Detail

### getFlattenedSuperTypeHierarchy

    protected static java.util.Set<JClassType> getFlattenedSuperTypeHierarchy(JClassType type)

  Returns all of the superclasses and superinterfaces for a given type including the type itself.

### addImplementedInterface

    public abstract void addImplementedInterface(JClassType intf)

### addMetaData

    public abstract void addMetaData(java.lang.String tagName,
                                     java.lang.String[] values)

  Description copied from interface: `HasMetaData`
  Adds additional metadata.

  Specified by:
    `addMetaData` in interface `HasMetaData`

### addModifierBits

    public abstract void addModifierBits(int bits)

### asParameterizationOf

    public JParameterizedType asParameterizationOf(JGenericType type)

### findConstructor

    public abstract JConstructor findConstructor(JType[] paramTypes)

### findField

    public abstract JField findField(java.lang.String name)

### findMethod

    public abstract JMethod findMethod(java.lang.String name,
                                       JType[] paramTypes)

### findNestedType

    public abstract JClassType findNestedType(java.lang.String typeName)

### getAnnotation

    public abstract <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)

  Description copied from interface: `HasAnnotations`
  Returns an instance of the specified annotation type if it is present on this element or `null` if it is not.

  Specified by:
    `getAnnotation` in interface `HasAnnotations`
  Parameters:
    `annotationClass` - annotation type to search for
  Returns:
    instance of the specified annotation type if it is present on this element or `null` if it is not

### getConstructor

    public abstract JConstructor getConstructor(JType[] paramTypes)
                                         throws NotFoundException

  Throws:
    `NotFoundException`

### getConstructors

    public abstract JConstructor[] getConstructors()

### getEnclosingType

    public abstract JClassType getEnclosingType()

### getErasedType

    public abstract JClassType getErasedType()

  Specified by:
    `getErasedType` in class `JType`

### getField

    public abstract JField getField(java.lang.String name)

### getFields

    public abstract JField[] getFields()

### getImplementedInterfaces

    public abstract JClassType[] getImplementedInterfaces()

### getMetaData

    public abstract java.lang.String[][] getMetaData(java.lang.String tagName)

  Description copied from interface: `HasMetaData`
  Gets each list of metadata for the specified tag name.

  Specified by:
    `getMetaData` in interface `HasMetaData`

### getMetaDataTags

    public abstract java.lang.String[] getMetaDataTags()

  Description copied from interface: `HasMetaData`
  Gets the name of available metadata tags.

  Specified by:
    `getMetaDataTags` in interface `HasMetaData`

### getMethod

    public abstract JMethod getMethod(java.lang.String name,
                                      JType[] paramTypes)
                               throws NotFoundException

  Throws:
    `NotFoundException`

### getMethods

    public abstract JMethod[] getMethods()

### getName

    public abstract java.lang.String getName()

### getNestedType

    public abstract JClassType getNestedType(java.lang.String typeName)
                                      throws NotFoundException

  Throws:
    `NotFoundException`

### getNestedTypes

    public abstract JClassType[] getNestedTypes()

### getOracle

    public abstract TypeOracle getOracle()

### getOverloads

    public abstract JMethod[] getOverloads(java.lang.String name)

### getOverridableMethods

    public abstract JMethod[] getOverridableMethods()

  Iterates over the most-derived declaration of each unique overridable method available in the type hierarchy of the specified type, including those found in superclasses and superinterfaces. A method is overridable if it is not `final` and its accessibility is `public`, `protected`, or package protected. Deferred binding generators often need to generate method implementations; this method offers a convenient way to find candidate methods to implement. Note that the behavior does not match `Class.getMethod(String, Class[])`, which does not return the most derived method in some cases.

  Returns:
    an array of `JMethod` objects representing overridable methods

### getPackage

    public abstract JPackage getPackage()

### getSubtypes

    public abstract JClassType[] getSubtypes()

### getSuperclass

    public abstract JClassType getSuperclass()

### isAbstract

    public abstract boolean isAbstract()

### isAnnotationPresent

    public abstract boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)

  Description copied from interface: `HasAnnotations`
  Returns `true` if this item has an annotation of the specified type.

  Specified by:
    `isAnnotationPresent` in interface `HasAnnotations`
  Returns:
    `true` if this item has an annotation of the specified type

### isAssignableFrom

    public boolean isAssignableFrom(JClassType possibleSubtype)

  Returns `true` if this `JClassType` is assignable from the specified `JClassType` parameter.

  Parameters:
    `possibleSubtype` - possible subtype of this `JClassType`
  Returns:
    `true` if this `JClassType` is assignable from the specified `JClassType` parameter
  Throws:
    `java.lang.NullPointerException` - if `possibleSubtype` is `null`

### isAssignableTo

    public boolean isAssignableTo(JClassType possibleSupertype)

  Returns `true` if this `JClassType` is assignable to the specified `JClassType` parameter.

  Parameters:
    `possibleSupertype` - possible supertype of this `JClassType`
  Returns:
    `true` if this `JClassType` is assignable to the specified `JClassType` parameter
  Throws:
    `java.lang.NullPointerException` - if `possibleSupertype` is `null`

### isDefaultInstantiable

    public abstract boolean isDefaultInstantiable()

  Determines if the class can be constructed using a simple `new` operation. Specifically, the class must
  - be a class rather than an interface,
  - have either no constructors or a parameterless constructor, and
  - be a top-level class or a static nested class.

  Returns:
    `true` if the type is default instantiable, or `false` otherwise

### isFinal

    public abstract boolean isFinal()

### isGenericType

    public abstract JGenericType isGenericType()

  Specified by:
    `isGenericType` in class `JType`

### isInterface

    public abstract JClassType isInterface()

  Specified by:
    `isInterface` in class `JType`

### isLocalType

    public abstract boolean isLocalType()

  Tests if this type is a local type (within a method).

  Returns:
    true if this type is a local type, whether it is named or anonymous.

### isMemberType

    public abstract boolean isMemberType()

  Tests if this type is contained within another type.

  Returns:
    true if this type has an enclosing type, false if this type is a top-level type

### isPrivate

    public abstract boolean isPrivate()

### isProtected

    public abstract boolean isProtected()

### isPublic

    public abstract boolean isPublic()

### isStatic

    public abstract boolean isStatic()

### setSuperclass

    public abstract void setSuperclass(JClassType type)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### acceptSubtype

    protected abstract void acceptSubtype(JClassType me)

### getModifierBits

    protected abstract int getModifierBits()

### getOverridableMethodsOnSuperclassesAndThisClass

    protected abstract void getOverridableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)

### getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface

    protected abstract void getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)

  Gets the methods declared in interfaces that this type extends. If this type is a class, its own methods are not added. If this type is an interface, its own methods are added. Used internally by `getOverridableMethods()`.

  Parameters:
    `methodsBySignature` -

### isMaybeParameterizedType

    protected com.google.gwt.core.ext.typeinfo.JMaybeParameterizedType isMaybeParameterizedType()

### makeCompoundName

    protected final java.lang.String makeCompoundName(JClassType type)

### notifySuperTypesOf

    protected abstract void notifySuperTypesOf(JClassType me)

  Tells this type's superclasses and superinterfaces about it.

### removeSubtype

    protected abstract void removeSubtype(JClassType me)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD