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 JRealClassType

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

All Implemented Interfaces:
  HasAnnotations, HasMetaData

Direct Known Subclasses:
  JAnnotationType, JEnumType, JGenericType

    public class JRealClassType

extends JClassType

Type representing a Java class or interface type that a user would declare.

Constructor Summary
`JRealClassType(TypeOracle oracle, JPackage declaringPackage, JClassType enclosingType, boolean isLocalType, java.lang.String name, boolean isInterface)`

Method Summary
`protected void` | `acceptSubtype(JClassType me)`
`void` | `addAnnotations(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotations)`
`protected void` | `addConstructor(JConstructor ctor)`
`protected void` | `addField(JField field)`
`void` | `addImplementedInterface(JClassType intf)`
`void` | `addMetaData(java.lang.String tagName, java.lang.String[] values)` Adds additional metadata.
`protected void` | `addMethod(JMethod method)`
`void` | `addModifierBits(int bits)`
`protected void` | `addNestedType(JClassType type)`
`JConstructor` | `findConstructor(JType[] paramTypes)`
`JField` | `findField(java.lang.String name)`
`JMethod` | `findMethod(java.lang.String name, JType[] paramTypes)`
`JClassType` | `findNestedType(java.lang.String typeName)`
`protected JClassType` | `findNestedTypeImpl(java.lang.String[] typeName, int index)`
`
`<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.
`JConstructor` | `getConstructor(JType[] paramTypes)`
`JConstructor[]` | `getConstructors()`
`JClassType` | `getEnclosingType()`
`JClassType` | `getErasedType()`
`JField` | `getField(java.lang.String name)`
`JField[]` | `getFields()`
`JClassType[]` | `getImplementedInterfaces()`
`java.lang.String` | `getJNISignature()`
`java.lang.String[][]` | `getMetaData(java.lang.String tagName)` Gets each list of metadata for the specified tag name.
`java.lang.String[]` | `getMetaDataTags()` Gets the name of available metadata tags.
`JMethod` | `getMethod(java.lang.String name, JType[] paramTypes)`
`JMethod[]` | `getMethods()`
`protected int` | `getModifierBits()`
`java.lang.String` | `getName()`
`JClassType` | `getNestedType(java.lang.String typeName)`
`JClassType[]` | `getNestedTypes()`
`TypeOracle` | `getOracle()`
`JMethod[]` | `getOverloads(java.lang.String name)`
`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 void` | `getOverridableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)`
`protected void` | `getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)` Gets the methods declared in interfaces that this type extends.
`JPackage` | `getPackage()`
`java.lang.String` | `getQualifiedSourceName()`
`java.lang.String` | `getSimpleSourceName()`
`JClassType[]` | `getSubtypes()`
`JClassType` | `getSuperclass()`
`void` | `invalidate()` TODO: solve this better.
`boolean` | `isAbstract()`
`boolean` | `isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)` Returns `true` if this item has an annotation of the specified type.
`JArrayType` | `isArray()`
`JClassType` | `isClass()`
`boolean` | `isDefaultInstantiable()` Determines if the class can be constructed using a simple `new` operation.
`JEnumType` | `isEnum()` Returns this instance if it is an enumeration or `null` if it is not.
`boolean` | `isFinal()`
`JGenericType` | `isGenericType()`
`JClassType` | `isInterface()`
`boolean` | `isLocalType()` Tests if this type is a local type (within a method).
`boolean` | `isMemberType()` Tests if this type is contained within another type.
`JParameterizedType` | `isParameterized()`
`JPrimitiveType` | `isPrimitive()`
`boolean` | `isPrivate()`
`boolean` | `isProtected()`
`boolean` | `isPublic()`
`JRawType` | `isRawType()`
`boolean` | `isStatic()`
`JWildcardType` | `isWildcard()`
`protected void` | `notifySuperTypesOf(JClassType me)` Tells this type's superclasses and superinterfaces about it.
`protected void` | `removeSubtype(JClassType me)`
`void` | `setSuperclass(JClassType type)`
`java.lang.String` | `toString()`

Methods inherited from class com.google.gwt.core.ext.typeinfo.JClassType
`asParameterizationOf, getFlattenedSuperTypeHierarchy, isAssignableFrom, isAssignableTo, isMaybeParameterizedType, makeCompoundName`

Methods inherited from class com.google.gwt.core.ext.typeinfo.JType
`getLeafType, getParameterizedQualifiedSourceName, isAnnotation, isClassOrInterface, isTypeParameter`

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

Constructor Detail

### JRealClassType

    public JRealClassType(TypeOracle oracle,
                          JPackage declaringPackage,
                          JClassType enclosingType,
                          boolean isLocalType,
                          java.lang.String name,
                          boolean isInterface)

Method Detail

### addAnnotations

    public void addAnnotations(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotations)

### addImplementedInterface

    public void addImplementedInterface(JClassType intf)

  Specified by:
    `addImplementedInterface` in class `JClassType`

### addMetaData

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

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

  Specified by:
    `addMetaData` in interface `HasMetaData`
  Specified by:
    `addMetaData` in class `JClassType`

### addModifierBits

    public void addModifierBits(int bits)

  Specified by:
    `addModifierBits` in class `JClassType`

### findConstructor

    public JConstructor findConstructor(JType[] paramTypes)

  Specified by:
    `findConstructor` in class `JClassType`

### findField

    public JField findField(java.lang.String name)

  Specified by:
    `findField` in class `JClassType`

### findMethod

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

  Specified by:
    `findMethod` in class `JClassType`

### findNestedType

    public JClassType findNestedType(java.lang.String typeName)

  Specified by:
    `findNestedType` in class `JClassType`

### getAnnotation

    public <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`
  Specified by:
    `getAnnotation` in class `JClassType`
  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 JConstructor getConstructor(JType[] paramTypes)
                                throws NotFoundException

  Specified by:
    `getConstructor` in class `JClassType`
  Throws:
    `NotFoundException`

### getConstructors

    public JConstructor[] getConstructors()

  Specified by:
    `getConstructors` in class `JClassType`

### getEnclosingType

    public JClassType getEnclosingType()

  Specified by:
    `getEnclosingType` in class `JClassType`

### getErasedType

    public JClassType getErasedType()

  Specified by:
    `getErasedType` in class `JClassType`

### getField

    public JField getField(java.lang.String name)

  Specified by:
    `getField` in class `JClassType`

### getFields

    public JField[] getFields()

  Specified by:
    `getFields` in class `JClassType`

### getImplementedInterfaces

    public JClassType[] getImplementedInterfaces()

  Specified by:
    `getImplementedInterfaces` in class `JClassType`

### getJNISignature

    public java.lang.String getJNISignature()

  Specified by:
    `getJNISignature` in class `JType`

### getMetaData

    public 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`
  Specified by:
    `getMetaData` in class `JClassType`

### getMetaDataTags

    public java.lang.String[] getMetaDataTags()

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

  Specified by:
    `getMetaDataTags` in interface `HasMetaData`
  Specified by:
    `getMetaDataTags` in class `JClassType`

### getMethod

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

  Specified by:
    `getMethod` in class `JClassType`
  Throws:
    `NotFoundException`

### getMethods

    public JMethod[] getMethods()

  Specified by:
    `getMethods` in class `JClassType`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in class `JClassType`

### getNestedType

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

  Specified by:
    `getNestedType` in class `JClassType`
  Throws:
    `NotFoundException`

### getNestedTypes

    public JClassType[] getNestedTypes()

  Specified by:
    `getNestedTypes` in class `JClassType`

### getOracle

    public TypeOracle getOracle()

  Specified by:
    `getOracle` in class `JClassType`

### getOverloads

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

  Specified by:
    `getOverloads` in class `JClassType`

### getOverridableMethods

    public JMethod[] getOverridableMethods()

  Description copied from class: `JClassType`
  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.

  Specified by:
    `getOverridableMethods` in class `JClassType`
  Returns:
    an array of `JMethod` objects representing overridable methods

### getPackage

    public JPackage getPackage()

  Specified by:
    `getPackage` in class `JClassType`

### getQualifiedSourceName

    public java.lang.String getQualifiedSourceName()

  Specified by:
    `getQualifiedSourceName` in class `JType`

### getSimpleSourceName

    public java.lang.String getSimpleSourceName()

  Specified by:
    `getSimpleSourceName` in class `JType`

### getSubtypes

    public JClassType[] getSubtypes()

  Specified by:
    `getSubtypes` in class `JClassType`

### getSuperclass

    public JClassType getSuperclass()

  Specified by:
    `getSuperclass` in class `JClassType`

### invalidate

    public void invalidate()

  TODO: solve this better.

### isAbstract

    public boolean isAbstract()

  Specified by:
    `isAbstract` in class `JClassType`

### isAnnotationPresent

    public 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`
  Specified by:
    `isAnnotationPresent` in class `JClassType`
  Returns:
    `true` if this item has an annotation of the specified type

### isArray

    public JArrayType isArray()

  Specified by:
    `isArray` in class `JType`

### isClass

    public JClassType isClass()

  Specified by:
    `isClass` in class `JType`

### isDefaultInstantiable

    public 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.

  Specified by:
    `isDefaultInstantiable` in class `JClassType`
  Returns:
    `true` if the type is default instantiable, or `false` otherwise

### isEnum

    public JEnumType isEnum()

  Description copied from class: `JType`
  Returns this instance if it is an enumeration or `null` if it is not.

  Specified by:
    `isEnum` in class `JType`
  Returns:
    this instance if it is an enumeration or `null` if it is not

### isFinal

    public boolean isFinal()

  Specified by:
    `isFinal` in class `JClassType`

### isGenericType

    public JGenericType isGenericType()

  Specified by:
    `isGenericType` in class `JClassType`

### isInterface

    public JClassType isInterface()

  Specified by:
    `isInterface` in class `JClassType`

### isLocalType

    public boolean isLocalType()

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

  Specified by:
    `isLocalType` in class `JClassType`
  Returns:
    true if this type is a local type, whether it is named or anonymous.

### isMemberType

    public boolean isMemberType()

  Tests if this type is contained within another type.

  Specified by:
    `isMemberType` in class `JClassType`
  Returns:
    true if this type has an enclosing type, false if this type is a top-level type

### isParameterized

    public JParameterizedType isParameterized()

  Specified by:
    `isParameterized` in class `JType`

### isPrimitive

    public JPrimitiveType isPrimitive()

  Specified by:
    `isPrimitive` in class `JType`

### isPrivate

    public boolean isPrivate()

  Specified by:
    `isPrivate` in class `JClassType`

### isProtected

    public boolean isProtected()

  Specified by:
    `isProtected` in class `JClassType`

### isPublic

    public boolean isPublic()

  Specified by:
    `isPublic` in class `JClassType`

### isRawType

    public JRawType isRawType()

  Specified by:
    `isRawType` in class `JType`

### isStatic

    public boolean isStatic()

  Specified by:
    `isStatic` in class `JClassType`

### isWildcard

    public JWildcardType isWildcard()

  Specified by:
    `isWildcard` in class `JType`

### setSuperclass

    public void setSuperclass(JClassType type)

  Specified by:
    `setSuperclass` in class `JClassType`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `JClassType`

### acceptSubtype

    protected void acceptSubtype(JClassType me)

  Specified by:
    `acceptSubtype` in class `JClassType`

### addConstructor

    protected void addConstructor(JConstructor ctor)

### addField

    protected void addField(JField field)

### addMethod

    protected void addMethod(JMethod method)

### addNestedType

    protected void addNestedType(JClassType type)

### findNestedTypeImpl

    protected JClassType findNestedTypeImpl(java.lang.String[] typeName,
                                            int index)

### getModifierBits

    protected int getModifierBits()

  Specified by:
    `getModifierBits` in class `JClassType`

### getOverridableMethodsOnSuperclassesAndThisClass

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

  Specified by:
    `getOverridableMethodsOnSuperclassesAndThisClass` in class `JClassType`

### getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface

    protected 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()`.

  Specified by:
    `getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface` in class `JClassType`
  Parameters:
    `methodsBySignature` -

### notifySuperTypesOf

    protected void notifySuperTypesOf(JClassType me)

  Tells this type's superclasses and superinterfaces about it.

  Specified by:
    `notifySuperTypesOf` in class `JClassType`

### removeSubtype

    protected void removeSubtype(JClassType me)

  Specified by:
    `removeSubtype` in class `JClassType`

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