|
|||||||||
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)
|
|
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
|
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 |
---|
public JClassType()
Method Detail |
---|
protected static java.util.Set<JClassType> getFlattenedSuperTypeHierarchy(JClassType type)
public abstract void addImplementedInterface(JClassType intf)
public abstract void addMetaData(java.lang.String tagName, java.lang.String[] values)
HasMetaData
addMetaData
in interface HasMetaData
public abstract void addModifierBits(int bits)
public JParameterizedType asParameterizationOf(JGenericType type)
public 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 abstract JClassType[] getImplementedInterfaces()
public abstract java.lang.String[][] getMetaData(java.lang.String tagName)
HasMetaData
getMetaData
in interface HasMetaData
public abstract 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 abstract boolean isFinal()
public abstract JGenericType isGenericType()
isGenericType
in class JType
public abstract JClassType isInterface()
isInterface
in class JType
public abstract boolean isLocalType()
public abstract boolean isMemberType()
public abstract boolean isPrivate()
public abstract boolean isProtected()
public abstract boolean isPublic()
public abstract boolean isStatic()
public abstract void setSuperclass(JClassType type)
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract void acceptSubtype(JClassType me)
protected abstract int getModifierBits()
protected abstract void getOverridableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)
protected abstract void getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)
getOverridableMethods()
.
methodsBySignature
- protected com.google.gwt.core.ext.typeinfo.JMaybeParameterizedType isMaybeParameterizedType()
protected final java.lang.String makeCompoundName(JClassType type)
protected abstract void notifySuperTypesOf(JClassType me)
protected abstract void removeSubtype(JClassType me)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |