Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
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)`
`void` | `addMetaData(java.lang.String tagName, java.lang.String[] values)` Deprecated.
`abstract void` | `addModifierBits(int bits)`
`JParameterizedType` | `asParameterizationOf(JGenericType type)`
`
`<T extends java.lang.annotation.Annotation> T`
` | `findAnnotationInTypeHierarchy(java.lang.Class<T> annotationType)` Find an annotation on a type or on one of its superclasses or superinterfaces.
`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()`
`java.util.Set<JClassType>` | `getFlattenedSupertypeHierarchy()` Returns all of the superclasses and superinterfaces for a given type including the type itself.
`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()`
`java.lang.String[][]` | `getMetaData(java.lang.String tagName)` Deprecated.
`java.lang.String[]` | `getMetaDataTags()` Deprecated.
`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.
`boolean` | `isEnhanced()` Returns true if the type may be enhanced on the server to contain extra fields that are unknown to client code.
`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 abstract void` | `notifySuperTypesOf(JClassType me)` Tells this type's superclasses and superinterfaces about it.
`protected abstract void` | `removeSubtype(JClassType me)`
`void` | `setEnhanced()` Indicates that the type may be enhanced on the server to contain extra fields that are unknown to client code.
`abstract void` | `setSuperclass(JClassType type)`
`java.lang.String` | `toString()`

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

Methods inherited from class java.lang.Object
`clone, finalize, getClass, 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. The returned set maintains an internal breadth-first ordering of the type, followed by its interfaces (and their super-interfaces), then the supertype and its interfaces, and so on.

### addImplementedInterface

    public abstract void addImplementedInterface(JClassType intf)

### addMetaData

    @Deprecated
    public final void addMetaData(java.lang.String tagName,
                                             java.lang.String[] values)

  Deprecated.

  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)

### findAnnotationInTypeHierarchy

    public <T extends java.lang.annotation.Annotation> T findAnnotationInTypeHierarchy(java.lang.Class<T> annotationType)

  Find an annotation on a type or on one of its superclasses or superinterfaces.

  This provides semantics similar to that of `Inherited` except that it checks all types to which this type is assignable. `@Inherited` only works on superclasses, not superinterfaces.

  Annotations present on the superclass chain will be returned preferentially over those found in the superinterface hierarchy. Note that the annotation does not need to be tagged with `@Inherited` in order to be returned from the superclass chain.

  Parameters:
    `annotationType` - the type of the annotation to look for
  Returns:
    the desired annotation or `null` if the annotation is not present in the type's type hierarchy

### 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()

### getFlattenedSupertypeHierarchy

    public java.util.Set<JClassType> getFlattenedSupertypeHierarchy()

  Returns all of the superclasses and superinterfaces for a given type including the type itself. The returned set maintains an internal breadth-first ordering of the type, followed by its interfaces (and their super-interfaces), then the supertype and its interfaces, and so on.

### getImplementedInterfaces

    public abstract JClassType[] getImplementedInterfaces()

### getMetaData

    @Deprecated
    public final java.lang.String[][] getMetaData(java.lang.String tagName)

  Deprecated.

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

  Specified by:
    `getMetaData` in interface `HasMetaData`

### getMetaDataTags

    @Deprecated
    public final java.lang.String[] getMetaDataTags()

  Deprecated.

  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

### isEnhanced

    public final boolean isEnhanced()

  Returns true if the type may be enhanced on the server to contain extra fields that are unknown to client code.

  Returns:
    `true` if the type might be enhanced on the server

### 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()

### setEnhanced

    public void setEnhanced()

  Indicates that the type may be enhanced on the server to contain extra fields that are unknown to client code.

### 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()

### 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
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD