public static class Java.MemberEnumDeclaration extends Java.MemberClassDeclaration implements Java.EnumDeclaration
implementedTypes, name, optionalExtendedTypeconstructors, variableDeclaratorsAndInitializersanonymousClassCount, localClassCount| Constructor and Description |
|---|
MemberEnumDeclaration(Location location,
String optionalDocComment,
Java.Modifiers modifiers,
String name,
Java.Type[] implementedTypes) |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(Visitor.TypeBodyDeclarationVisitor<R,EX> visitor)
Invokes the '
visit...()' method of Visitor.TypeBodyDeclarationVisitor for the concrete
Java.TypeBodyDeclaration type. |
<R,EX extends Throwable> |
accept(Visitor.TypeDeclarationVisitor<R,EX> visitor)
Invokes the '
visit...()' method of Visitor.TypeDeclarationVisitor for the concrete Java.TypeDeclaration type. |
void |
addConstant(Java.EnumConstant ec)
Adds another constant to this enum declaration.
|
void |
defineSyntheticField(IClass.IField iField)
Inner classes have zero or more synthetic fields that hold references to their enclosing
context:
this$n
(Mandatory for non-private non-static member classes; optional for private non-static
member classes, local classes in non-static context, and anonymous classes in
non-static context; forbidden for static member classes, local classes in static
context, and anonymous classes in static context)
Holds a reference to the immediately enclosing instance. |
List<Java.EnumConstant> |
getConstants() |
Java.Type[] |
getImplementedTypes() |
getClassName, getDeclaringType, isStatic, setDeclaringTypegetDocComment, getName, hasDeprecatedDocTag, toStringaddConstructor, addFieldDeclaration, addInitializer, defineSyntheticField, getSyntheticFields, getVariableDeclaratorsAndInitializersaddDeclaredMethod, addMemberTypeDeclaration, createAnonymousClassName, createLocalTypeName, getAnnotations, getEnclosingScope, getLocation, getMemberTypeDeclaration, getMemberTypeDeclarations, getMethodDeclaration, getMethodDeclarations, getModifierFlags, getOptionalTypeParameters, invalidateMethodCaches, setEnclosingScope, throwCompileExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamegetSyntheticFields, getVariableDeclaratorsAndInitializersgetOptionalTypeParameterscreateAnonymousClassName, createLocalTypeName, getClassName, getMemberTypeDeclaration, getMemberTypeDeclarations, getMethodDeclaration, getMethodDeclarations, getModifierFlagsgetAnnotationsgetLocation, throwCompileExceptiongetEnclosingScopegetDocComment, hasDeprecatedDocTagpublic MemberEnumDeclaration(Location location, @Nullable String optionalDocComment, Java.Modifiers modifiers, String name, Java.Type[] implementedTypes)
public Java.Type[] getImplementedTypes()
getImplementedTypes in interface Java.EnumDeclarationpublic List<Java.EnumConstant> getConstants()
getConstants in interface Java.EnumDeclarationpublic void addConstant(Java.EnumConstant ec)
Java.EnumDeclarationaddConstant in interface Java.EnumDeclaration@Nullable public <R,EX extends Throwable> R accept(Visitor.TypeDeclarationVisitor<R,EX> visitor) throws EX extends Throwable
Java.TypeDeclarationvisit...()' method of Visitor.TypeDeclarationVisitor for the concrete Java.TypeDeclaration type.accept in interface Java.TypeDeclarationaccept in class Java.MemberClassDeclarationEX extends Throwable@Nullable public <R,EX extends Throwable> R accept(Visitor.TypeBodyDeclarationVisitor<R,EX> visitor) throws EX extends Throwable
Java.TypeBodyDeclarationvisit...()' method of Visitor.TypeBodyDeclarationVisitor for the concrete
Java.TypeBodyDeclaration type.accept in interface Java.TypeBodyDeclarationaccept in class Java.MemberClassDeclarationEXEX extends Throwablepublic void defineSyntheticField(IClass.IField iField) throws CompileException
this$nn is
N-1 for the Nth nesting level; e.g. the public non-static member class of a
package member class has a synthetic field this$0.
val$local-variable-namefinal local variables of the defining context.
IClass.IField array returned
by IClass.getDeclaredIFields2().
If a synthetic field with the same name exists already, then it must have the same type and the redefinition is ignored.
iField - CompileException