public final class EnumConstantDeclaration extends BodyDeclaration<EnumConstantDeclaration> implements NodeWithJavadoc<EnumConstantDeclaration>, NodeWithSimpleName<EnumConstantDeclaration>, NodeWithArguments<EnumConstantDeclaration>, Resolvable<ResolvedEnumConstantDeclaration>
enum X { A(1), B(2) }Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
EnumConstantDeclaration() |
EnumConstantDeclaration(NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> classBody) |
EnumConstantDeclaration(String name) |
EnumConstantDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> classBody)
This constructor is used by the parser and is considered private.
|
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
EnumConstantDeclaration |
asEnumConstantDeclaration() |
EnumConstantDeclaration |
clone() |
NodeList<Expression> |
getArguments() |
NodeList<BodyDeclaration<?>> |
getClassBody() |
EnumConstantDeclarationMetaModel |
getMetaModel() |
SimpleName |
getName() |
void |
ifEnumConstantDeclaration(Consumer<EnumConstantDeclaration> action) |
boolean |
isEnumConstantDeclaration() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
ResolvedEnumConstantDeclaration |
resolve() |
EnumConstantDeclaration |
setArguments(NodeList<Expression> arguments) |
EnumConstantDeclaration |
setClassBody(NodeList<BodyDeclaration<?>> classBody) |
EnumConstantDeclaration |
setName(SimpleName name) |
Optional<EnumConstantDeclaration> |
toEnumConstantDeclaration() |
asAnnotationDeclaration, asAnnotationMemberDeclaration, asCallableDeclaration, asClassOrInterfaceDeclaration, asConstructorDeclaration, asEnumDeclaration, asFieldDeclaration, asInitializerDeclaration, asMethodDeclaration, asTypeDeclaration, getAnnotations, ifAnnotationDeclaration, ifAnnotationMemberDeclaration, ifCallableDeclaration, ifClassOrInterfaceDeclaration, ifConstructorDeclaration, ifEnumDeclaration, ifFieldDeclaration, ifInitializerDeclaration, ifMethodDeclaration, ifTypeDeclaration, isAnnotationDeclaration, isAnnotationMemberDeclaration, isCallableDeclaration, isClassOrInterfaceDeclaration, isConstructorDeclaration, isEnumDeclaration, isFieldDeclaration, isInitializerDeclaration, isMethodDeclaration, isTypeDeclaration, setAnnotations, toAnnotationDeclaration, toAnnotationMemberDeclaration, toCallableDeclaration, toClassOrInterfaceDeclaration, toConstructorDeclaration, toEnumDeclaration, toFieldDeclaration, toInitializerDeclaration, toMethodDeclaration, toTypeDeclarationaddOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitgetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocComment, setJavadocCommentgetNameAsExpression, getNameAsString, setNameaddArgument, addArgument, getArgument, setArgumentaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitfindAncestor, findAncestorcontainsWithin, getBegin, getEndpublic EnumConstantDeclaration()
public EnumConstantDeclaration(String name)
public EnumConstantDeclaration(NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> classBody)
public EnumConstantDeclaration(TokenRange tokenRange, NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> classBody)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitablepublic NodeList<Expression> getArguments()
getArguments in interface NodeWithArguments<EnumConstantDeclaration>public NodeList<BodyDeclaration<?>> getClassBody()
public SimpleName getName()
getName in interface NodeWithSimpleName<EnumConstantDeclaration>public EnumConstantDeclaration setArguments(NodeList<Expression> arguments)
setArguments in interface NodeWithArguments<EnumConstantDeclaration>public EnumConstantDeclaration setClassBody(NodeList<BodyDeclaration<?>> classBody)
public EnumConstantDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<EnumConstantDeclaration>public boolean remove(Node node)
remove in class BodyDeclaration<EnumConstantDeclaration>public EnumConstantDeclaration clone()
clone in class BodyDeclaration<EnumConstantDeclaration>public EnumConstantDeclarationMetaModel getMetaModel()
getMetaModel in class BodyDeclaration<EnumConstantDeclaration>public boolean replace(Node node, Node replacementNode)
replace in class BodyDeclaration<EnumConstantDeclaration>public boolean isEnumConstantDeclaration()
isEnumConstantDeclaration in class BodyDeclaration<EnumConstantDeclaration>public EnumConstantDeclaration asEnumConstantDeclaration()
asEnumConstantDeclaration in class BodyDeclaration<EnumConstantDeclaration>public void ifEnumConstantDeclaration(Consumer<EnumConstantDeclaration> action)
ifEnumConstantDeclaration in class BodyDeclaration<EnumConstantDeclaration>public ResolvedEnumConstantDeclaration resolve()
resolve in interface Resolvable<ResolvedEnumConstantDeclaration>public Optional<EnumConstantDeclaration> toEnumConstantDeclaration()
toEnumConstantDeclaration in class BodyDeclaration<EnumConstantDeclaration>Copyright © 2007–2019. All rights reserved.