public class JClassType extends JDeclaredType
JDeclaredType.NestedClassDisposition
HasName.Util
Modifier and Type | Field and Description |
---|---|
static JClassType |
NULL_CLASS |
fields, methods
NULL_TYPE
BY_NAME_COMPARATOR
Constructor and Description |
---|
JClassType(SourceInfo info,
String name,
boolean isAbstract,
boolean isFinal) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeReferencedExternally() |
JMethod |
getInitMethod()
Returns the instance initializer ($init) method.
|
JClassType |
getSuperClass()
Returns this type's super class, or
null if this type is
Object or an interface. |
boolean |
isAbstract() |
JEnumType |
isEnumOrSubclass()
Returns the (closest) enum supertype if the type is a subclass of an enum; it returns
this if this is a JEnumType and null otherwise. |
boolean |
isFinal() |
boolean |
isJavaLangObject() |
boolean |
isJsFunctionImplementation() |
boolean |
isJsoType()
Returns
true if this is a JavaScriptObject type. |
void |
setSuperClass(JClassType superClass)
Sets this type's super class.
|
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
protected Object |
writeReplace()
Subclasses must replace themselves with a shallow reference when
JDeclaredType.isExternal() is true . |
addField, addImplements, addMethod, addMethod, canBeImplementedExternally, checkClinitTo, findMethod, findSubtype, getClassDisposition, getClinitMethod, getClinitTarget, getCompoundName, getConstructors, getEnclosingType, getFields, getImplements, getJavahSignatureName, getJsName, getJsNamespace, getJsniSignatureName, getMembers, getMethods, getQualifiedJsName, getSimpleName, getSuppressedWarnings, hasClinit, hasJsInteropEntryPoints, isArrayType, isClassWideExport, isExternal, isInstantiable, isJsFunction, isJsNative, isJsType, removeField, removeMethod, resolve, setClassDisposition, setEnclosingType, setExternal, setJsTypeInfo, setSuppressedWarnings, sortFields, sortMethods
canBeNull, canBeSubclass, getDefaultValue, getUnderlyingType, isPrimitiveType, replaces, strengthenToExact, strengthenToNonNull, weakenToNonExact, weakenToNullable
getDescription, getName, getPackageName, getShortName, isNullType
getSourceInfo, setSourceInfo, toSource, toString
public static JClassType NULL_CLASS
public JClassType(SourceInfo info, String name, boolean isAbstract, boolean isFinal)
public final JMethod getInitMethod()
JDeclaredType
getInitMethod
in class JDeclaredType
public final JClassType getSuperClass()
JDeclaredType
null
if this type is
Object
or an interface.getSuperClass
in class JDeclaredType
public boolean isAbstract()
public JEnumType isEnumOrSubclass()
JType
this
if this
is a JEnumType
and null
otherwise.isEnumOrSubclass
in class JType
public boolean isFinal()
public boolean isJsoType()
JType
true
if this is a JavaScriptObject type.public boolean isJavaLangObject()
isJavaLangObject
in class JType
public boolean canBeReferencedExternally()
canBeReferencedExternally
in class JDeclaredType
public boolean isJsFunctionImplementation()
isJsFunctionImplementation
in class JType
public final void setSuperClass(JClassType superClass)
public void traverse(JVisitor visitor, Context ctx)
JNode
protected Object writeReplace()
JDeclaredType
JDeclaredType.isExternal()
is true
.writeReplace
in class JDeclaredType
Copyright © 2018. All rights reserved.