|
GWT 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.ext.typeinfo.JType
com.google.gwt.core.ext.typeinfo.JClassType
public abstract class JClassType
Type used to represent any non-primitive type.
Constructor Summary | |
---|---|
JClassType()
|
Method Summary | ||
---|---|---|
protected abstract void |
acceptSubtype(JClassType me)
|
|
JParameterizedType |
asParameterizationOf(JGenericType type)
|
|
|
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
|
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()
|
|
abstract JMethod[] |
getInheritableMethods()
Iterates over the most-derived declaration of each unique inheritable method available in the type hierarchy of the specified type, including those found in superclasses and superinterfaces. |
|
protected abstract void |
getInheritableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)
|
|
protected abstract void |
getInheritableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)
Gets the methods declared in interfaces that this type extends. |
|
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. |
|
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()
|
|
boolean |
isLocalType()
Deprecated. local types are not modeled |
|
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. |
|
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 |
---|
public JClassType()
Method Detail |
---|
protected static java.util.Set<JClassType> getFlattenedSuperTypeHierarchy(JClassType type)
public JParameterizedType asParameterizationOf(JGenericType type)
public <T extends java.lang.annotation.Annotation> T findAnnotationInTypeHierarchy(java.lang.Class<T> annotationType)
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.
annotationType
- the type of the annotation to look for
null
if the annotation is
not present in the type's type hierarchypublic abstract JConstructor findConstructor(JType[] paramTypes)
public abstract JField findField(java.lang.String name)
public abstract JMethod findMethod(java.lang.String name, JType[] paramTypes)
public abstract JClassType findNestedType(java.lang.String typeName)
public abstract <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
HasAnnotations
null
if it is not.
getAnnotation
in interface HasAnnotations
annotationClass
- annotation type to search for
null
if it is notpublic abstract JConstructor getConstructor(JType[] paramTypes) throws NotFoundException
NotFoundException
public abstract JConstructor[] getConstructors()
public abstract JClassType getEnclosingType()
public abstract JClassType getErasedType()
getErasedType
in class JType
public abstract JField getField(java.lang.String name)
public abstract JField[] getFields()
public java.util.Set<JClassType> getFlattenedSupertypeHierarchy()
public abstract JClassType[] getImplementedInterfaces()
public abstract JMethod[] getInheritableMethods()
public
, protected
, or
package protected.
This method offers a convenient way for Generators to find candidate
methods to call from a subclass.
JMethod
objects representing inheritable
methods@Deprecated public final java.lang.String[][] getMetaData(java.lang.String tagName)
HasMetaData
getMetaData
in interface HasMetaData
@Deprecated public final java.lang.String[] getMetaDataTags()
HasMetaData
getMetaDataTags
in interface HasMetaData
public abstract JMethod getMethod(java.lang.String name, JType[] paramTypes) throws NotFoundException
NotFoundException
public abstract JMethod[] getMethods()
public abstract java.lang.String getName()
public abstract JClassType getNestedType(java.lang.String typeName) throws NotFoundException
NotFoundException
public abstract JClassType[] getNestedTypes()
public abstract TypeOracle getOracle()
public abstract JMethod[] getOverloads(java.lang.String name)
public abstract JMethod[] getOverridableMethods()
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.
JMethod
objects representing overridable
methodspublic abstract JPackage getPackage()
public abstract JClassType[] getSubtypes()
public abstract JClassType getSuperclass()
public abstract boolean isAbstract()
public abstract boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
HasAnnotations
true
if this item has an annotation of the specified
type.
isAnnotationPresent
in interface HasAnnotations
true
if this item has an annotation of the specified
typepublic boolean isAssignableFrom(JClassType possibleSubtype)
true
if this JClassType
is assignable from the
specified JClassType
parameter.
possibleSubtype
- possible subtype of this JClassType
true
if this JClassType
is assignable from the
specified JClassType
parameter
java.lang.NullPointerException
- if possibleSubtype
is
null
public boolean isAssignableTo(JClassType possibleSupertype)
true
if this JClassType
is assignable to the
specified JClassType
parameter.
possibleSupertype
- possible supertype of this JClassType
true
if this JClassType
is assignable to the
specified JClassType
parameter
java.lang.NullPointerException
- if possibleSupertype
is
null
public abstract boolean isDefaultInstantiable()
new
operation. Specifically, the class must
true
if the type is default instantiable, or
false
otherwisepublic final boolean isEnhanced()
true
if the type might be enhanced on the serverpublic abstract boolean isFinal()
public abstract JGenericType isGenericType()
isGenericType
in class JType
public abstract JClassType isInterface()
isInterface
in class JType
@Deprecated public final boolean isLocalType()
public abstract boolean isMemberType()
public abstract boolean isPrivate()
public abstract boolean isProtected()
public abstract boolean isPublic()
public abstract boolean isStatic()
public void setEnhanced()
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract void acceptSubtype(JClassType me)
protected abstract void getInheritableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)
protected abstract void getInheritableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)
getOverridableMethods()
.
methodsBySignature
- protected abstract int getModifierBits()
protected com.google.gwt.core.ext.typeinfo.JMaybeParameterizedType isMaybeParameterizedType()
protected abstract void notifySuperTypesOf(JClassType me)
protected abstract void removeSubtype(JClassType me)
|
GWT 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |