class EnumJClassDef extends AbstractJClassDef implements JClassItem
JClassItem.Kind
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,ImplJEnumConstant> |
constants |
SMART_NAME_SORT
Constructor and Description |
---|
EnumJClassDef(int mods,
AbstractJClassDef enclosingClass,
java.lang.String name) |
EnumJClassDef(int mods,
ImplJSourceFile classFile,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
JEnumConstant |
_enum(java.lang.String name)
Add an enum constant.
|
JClassDef |
_extends(java.lang.Class<?> clazz)
Add an
extends type to this type. |
JClassDef |
_extends(JType type)
Add an
extends type to this type. |
JClassDef |
_extends(java.lang.String name)
Add an
extends type to this type. |
(package private) Tokens.$KW |
designation() |
JClassItem.Kind |
getItemKind()
Get the kind of item.
|
java.lang.String |
getName()
Get the name of this element, if there is one.
|
(package private) void |
writeContent(SourceFileWriter sourceFileWriter) |
_class, _class, _enum, _enum, _implements, _implements, _implements, _interface, _interface, add, add, annotationInterface, annotationInterface, blankLine, blockComment, constructor, constructor, erasedType, field, field, field, field, field, field, field, genericType, getClassFile, getContent, getEnclosingClass, getExtends, getImplements, getMemberIndentation, getModifiers, getMods, hasAllModifiers, hasAnyModifier, hasInterfaceStyleExtends, init, init, lineComment, method, method, method, method, methodCanHaveBody, section, staticInit, staticInit, supportsCompactInitOnly, typeParam, write, writeClassHeader, writeContentBlock
typeParams, typeParamsToArgs, writeTypeParams
annotate, annotate, annotate, writeAnnotations
deprecated, docComment, writeDocComments
writeComments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModifiers, hasAllModifiers, hasAnyModifier
annotate, annotate, annotate
deprecated, docComment
typeParams
private final java.util.Map<java.lang.String,ImplJEnumConstant> constants
EnumJClassDef(int mods, ImplJSourceFile classFile, java.lang.String name)
EnumJClassDef(int mods, AbstractJClassDef enclosingClass, java.lang.String name)
Tokens.$KW designation()
designation
in class AbstractJClassDef
public JEnumConstant _enum(java.lang.String name)
JClassDef
_enum
in interface JClassDef
_enum
in class AbstractJClassDef
name
- the constant namepublic JClassDef _extends(java.lang.String name)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
name
- the type namepublic JClassDef _extends(JType type)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
type
- the typepublic JClassDef _extends(java.lang.Class<?> clazz)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
clazz
- the typevoid writeContent(SourceFileWriter sourceFileWriter) throws java.io.IOException
writeContent
in class AbstractJClassDef
java.io.IOException
public JClassItem.Kind getItemKind()
JClassItem
getItemKind
in interface JClassItem
public java.lang.String getName()
JClassItem
getName
in interface JClassItem
getName
in class AbstractJClassDef
null
if there is none