public class JEnumType extends JClassType
JDeclaredType.NestedClassDisposition
HasName.Util
NULL_CLASS
fields, methods
NULL_TYPE
BY_NAME_COMPARATOR
Constructor and Description |
---|
JEnumType(SourceInfo info,
String name,
boolean isAbstract) |
Modifier and Type | Method and Description |
---|---|
void |
addField(JField field)
Adds a field to this type.
|
List<JEnumField> |
getEnumList()
Returns the list of enum fields in this enum.
|
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 |
isOrdinalized() |
void |
setOrdinalized() |
canBeReferencedExternally, getInitMethod, getSuperClass, isAbstract, isFinal, isJavaLangObject, isJsFunctionImplementation, isJsoType, setSuperClass, traverse, writeReplace
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 JEnumType(SourceInfo info, String name, boolean isAbstract)
public void addField(JField field)
JDeclaredType
addField
in class JDeclaredType
public List<JEnumField> getEnumList()
public JEnumType isEnumOrSubclass()
JType
this
if this
is a JEnumType
and null
otherwise.isEnumOrSubclass
in class JClassType
public boolean isOrdinalized()
public void setOrdinalized()
Copyright © 2018. All rights reserved.