|
|||||||||
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
com.google.gwt.core.ext.typeinfo.JRealClassType
public class JRealClassType
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)
|
|
|
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 |
---|
public JRealClassType(TypeOracle oracle, JPackage declaringPackage, JClassType enclosingType, boolean isLocalType, java.lang.String name, boolean isInterface)
Method Detail |
---|
public void addAnnotations(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotations)
public void addImplementedInterface(JClassType intf)
addImplementedInterface
in class JClassType
public void addMetaData(java.lang.String tagName, java.lang.String[] values)
HasMetaData
addMetaData
in interface HasMetaData
addMetaData
in class JClassType
public void addModifierBits(int bits)
addModifierBits
in class JClassType
public JConstructor findConstructor(JType[] paramTypes)
findConstructor
in class JClassType
public JField findField(java.lang.String name)
findField
in class JClassType
public JMethod findMethod(java.lang.String name, JType[] paramTypes)
findMethod
in class JClassType
public JClassType findNestedType(java.lang.String typeName)
findNestedType
in class JClassType
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
HasAnnotations
null
if it is not.
getAnnotation
in interface HasAnnotations
getAnnotation
in class JClassType
annotationClass
- annotation type to search for
null
if it is notpublic JConstructor getConstructor(JType[] paramTypes) throws NotFoundException
getConstructor
in class JClassType
NotFoundException
public JConstructor[] getConstructors()
getConstructors
in class JClassType
public JClassType getEnclosingType()
getEnclosingType
in class JClassType
public JClassType getErasedType()
getErasedType
in class JClassType
public JField getField(java.lang.String name)
getField
in class JClassType
public JField[] getFields()
getFields
in class JClassType
public JClassType[] getImplementedInterfaces()
getImplementedInterfaces
in class JClassType
public java.lang.String getJNISignature()
getJNISignature
in class JType
public java.lang.String[][] getMetaData(java.lang.String tagName)
HasMetaData
getMetaData
in interface HasMetaData
getMetaData
in class JClassType
public java.lang.String[] getMetaDataTags()
HasMetaData
getMetaDataTags
in interface HasMetaData
getMetaDataTags
in class JClassType
public JMethod getMethod(java.lang.String name, JType[] paramTypes) throws NotFoundException
getMethod
in class JClassType
NotFoundException
public JMethod[] getMethods()
getMethods
in class JClassType
public java.lang.String getName()
getName
in class JClassType
public JClassType getNestedType(java.lang.String typeName) throws NotFoundException
getNestedType
in class JClassType
NotFoundException
public JClassType[] getNestedTypes()
getNestedTypes
in class JClassType
public TypeOracle getOracle()
getOracle
in class JClassType
public JMethod[] getOverloads(java.lang.String name)
getOverloads
in class JClassType
public JMethod[] getOverridableMethods()
JClassType
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.
getOverridableMethods
in class JClassType
JMethod
objects representing overridable
methodspublic JPackage getPackage()
getPackage
in class JClassType
public java.lang.String getQualifiedSourceName()
getQualifiedSourceName
in class JType
public java.lang.String getSimpleSourceName()
getSimpleSourceName
in class JType
public JClassType[] getSubtypes()
getSubtypes
in class JClassType
public JClassType getSuperclass()
getSuperclass
in class JClassType
public void invalidate()
public boolean isAbstract()
isAbstract
in class JClassType
public 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
isAnnotationPresent
in class JClassType
true
if this item has an annotation of the specified
typepublic JArrayType isArray()
isArray
in class JType
public JClassType isClass()
isClass
in class JType
public boolean isDefaultInstantiable()
new
operation. Specifically, the class must
isDefaultInstantiable
in class JClassType
true
if the type is default instantiable, or
false
otherwisepublic JEnumType isEnum()
JType
null
if it
is not.
isEnum
in class JType
null
if it
is notpublic boolean isFinal()
isFinal
in class JClassType
public JGenericType isGenericType()
isGenericType
in class JClassType
public JClassType isInterface()
isInterface
in class JClassType
public boolean isLocalType()
isLocalType
in class JClassType
public boolean isMemberType()
isMemberType
in class JClassType
public JParameterizedType isParameterized()
isParameterized
in class JType
public JPrimitiveType isPrimitive()
isPrimitive
in class JType
public boolean isPrivate()
isPrivate
in class JClassType
public boolean isProtected()
isProtected
in class JClassType
public boolean isPublic()
isPublic
in class JClassType
public JRawType isRawType()
isRawType
in class JType
public boolean isStatic()
isStatic
in class JClassType
public JWildcardType isWildcard()
isWildcard
in class JType
public void setSuperclass(JClassType type)
setSuperclass
in class JClassType
public java.lang.String toString()
toString
in class JClassType
protected void acceptSubtype(JClassType me)
acceptSubtype
in class JClassType
protected void addConstructor(JConstructor ctor)
protected void addField(JField field)
protected void addMethod(JMethod method)
protected void addNestedType(JClassType type)
protected JClassType findNestedTypeImpl(java.lang.String[] typeName, int index)
protected int getModifierBits()
getModifierBits
in class JClassType
protected void getOverridableMethodsOnSuperclassesAndThisClass(java.util.Map<java.lang.String,JMethod> methodsBySignature)
getOverridableMethodsOnSuperclassesAndThisClass
in class JClassType
protected void getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface(java.util.Map<java.lang.String,JMethod> methodsBySignature)
getOverridableMethods()
.
getOverridableMethodsOnSuperinterfacesAndMaybeThisInterface
in class JClassType
methodsBySignature
- protected void notifySuperTypesOf(JClassType me)
notifySuperTypesOf
in class JClassType
protected void removeSubtype(JClassType me)
removeSubtype
in class JClassType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |