public class JClassType extends JDeclaredType implements CanBeSetFinal
JDeclaredType.JsInteropType
HasName.Util
fields, jsInteropType, jsPrototype, methods
BY_NAME_COMPARATOR
Constructor and Description |
---|
JClassType(SourceInfo info,
String name,
boolean isAbstract,
boolean isFinal) |
JClassType(SourceInfo info,
String name,
boolean isAbstract,
boolean isFinal,
JDeclaredType.JsInteropType interopType) |
Modifier and Type | Method and Description |
---|---|
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 |
isJsPrototypeStub() |
void |
setFinal() |
void |
setJsPrototypeStub(boolean isJsPrototype) |
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, checkClinitTo, findMethod, findSubtype, getClinitMethod, getClinitTarget, getCompoundName, getEnclosingType, getFields, getImplements, getInitMethod, getJavahSignatureName, getJsInteropType, getJsNamespace, getJsniSignatureName, getJsPrototype, getMethods, getQualifiedExportName, hasClinit, isExternal, isInstantiable, isJsType, removeField, removeMethod, resolve, setEnclosingType, setExternal, setJsNamespace, sortFields, sortMethods
canBeNull, getDefaultValue, getNonNull, getUnderlyingType, replaces
getName, getPackageName, getShortName
getSourceInfo, setSourceInfo, toSource, toString
public JClassType(SourceInfo info, String name, boolean isAbstract, boolean isFinal, JDeclaredType.JsInteropType interopType)
public JClassType(SourceInfo info, String name, boolean isAbstract, boolean isFinal)
public final JClassType getSuperClass()
JDeclaredType
null
if this type is
Object
or an interface.getSuperClass
in class JDeclaredType
public boolean isAbstract()
isAbstract
in interface CanBeAbstract
public JEnumType isEnumOrSubclass()
JType
this
if this
is a
JEnumType} and null
otherwise.isEnumOrSubclass
in class JType
public boolean isFinal()
isFinal
in interface CanBeFinal
public void setFinal()
setFinal
in interface CanBeSetFinal
public final void setSuperClass(JClassType superClass)
public boolean isJsPrototypeStub()
public void setJsPrototypeStub(boolean isJsPrototype)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
traverse
in interface JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalprotected Object writeReplace()
JDeclaredType
JDeclaredType.isExternal()
is true
.writeReplace
in class JDeclaredType
Copyright © 2016. All rights reserved.