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:
- HasMetaData
- public class JClassType
- extends JType
- implements HasMetaData
JClassType
public JClassType(TypeOracle oracle,
CompilationUnitProvider cup,
JPackage declaringPackage,
JClassType enclosingType,
String name,
int declStart,
int declEnd,
int bodyStart,
int bodyEnd,
boolean isInterface)
addImplementedInterface
public void addImplementedInterface(JClassType intf)
addMetaData
public void addMetaData(String tagName,
String[] values)
- Description copied from interface:
HasMetaData
- Adds additional metadata.
- Specified by:
addMetaData
in interface HasMetaData
addModifierBits
public void addModifierBits(int bits)
findConstructor
public JConstructor findConstructor(JType[] paramTypes)
findField
public JField findField(String name)
findMethod
public JMethod findMethod(String name,
JType[] paramTypes)
findNestedType
public JClassType findNestedType(String typeName)
getBodyEnd
public int getBodyEnd()
getBodyStart
public int getBodyStart()
getCompilationUnit
public CompilationUnitProvider getCompilationUnit()
getConstructor
public JConstructor getConstructor(JType[] paramTypes)
throws NotFoundException
- Throws:
NotFoundException
getConstructors
public JConstructor[] getConstructors()
getEnclosingType
public JClassType getEnclosingType()
getField
public JField getField(String name)
getFields
public JField[] getFields()
getImplementedInterfaces
public JClassType[] getImplementedInterfaces()
getJNISignature
public String getJNISignature()
- Specified by:
getJNISignature
in class JType
getMetaData
public String[][] getMetaData(String tagName)
- Description copied from interface:
HasMetaData
- Gets each list of metadata for the specified tag name.
- Specified by:
getMetaData
in interface HasMetaData
getMetaDataTags
public String[] getMetaDataTags()
- Description copied from interface:
HasMetaData
- Gets the name of available metadata tags.
- Specified by:
getMetaDataTags
in interface HasMetaData
getMethod
public JMethod getMethod(String name,
JType[] paramTypes)
throws NotFoundException
- Throws:
NotFoundException
getMethods
public JMethod[] getMethods()
getName
public String getName()
getNestedType
public JClassType getNestedType(String typeName)
throws NotFoundException
- Throws:
NotFoundException
getNestedTypes
public JClassType[] getNestedTypes()
getOracle
public TypeOracle getOracle()
getOverloads
public JMethod[] getOverloads(String name)
getPackage
public JPackage getPackage()
getQualifiedSourceName
public String getQualifiedSourceName()
- Specified by:
getQualifiedSourceName
in class JType
getSimpleSourceName
public String getSimpleSourceName()
- Specified by:
getSimpleSourceName
in class JType
getSubtypes
public JClassType[] getSubtypes()
getSuperclass
public JClassType getSuperclass()
getTypeHash
public String getTypeHash()
throws UnableToCompleteException
- Throws:
UnableToCompleteException
isAbstract
public boolean isAbstract()
isArray
public JArrayType isArray()
- Specified by:
isArray
in class JType
isAssignableTo
public boolean isAssignableTo(JClassType possibleSupertype)
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
public
constructor, and
- be a top-level class or a static nested class.
- Returns:
true
if the type is default instantiable, or
false
otherwise
isInterface
public JClassType isInterface()
- Specified by:
isInterface
in class JType
isParameterized
public JParameterizedType isParameterized()
- Specified by:
isParameterized
in class JType
isPrimitive
public JPrimitiveType isPrimitive()
- Specified by:
isPrimitive
in class JType
isPrivate
public boolean isPrivate()
isProtected
public boolean isProtected()
isPublic
public boolean isPublic()
isStatic
public boolean isStatic()
setSuperclass
public void setSuperclass(JClassType type)
toString
public String toString()
getModifierBits
protected int getModifierBits()
This javadoc distribution was not produced by Google. The official documentation is here.