NodeWithAnnotations<EnumConstantDeclaration>, NodeWithArguments<EnumConstantDeclaration>, NodeWithJavadoc<EnumConstantDeclaration>, NodeWithRange<EnumConstantDeclaration>, NodeWithSimpleName<EnumConstantDeclaration>, NodeWithTokenRange<EnumConstantDeclaration>, Observable, Visitable, HasParentNode<EnumConstantDeclaration>, Cloneablepublic final class EnumConstantDeclaration extends BodyDeclaration<EnumConstantDeclaration> implements NodeWithJavadoc<EnumConstantDeclaration>, NodeWithSimpleName<EnumConstantDeclaration>, NodeWithArguments<EnumConstantDeclaration>
enum X { A(1), B(2) }Node.ObserverRegistrationMode, Node.ParsednessABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor | Description |
|---|---|
EnumConstantDeclaration() |
|
EnumConstantDeclaration(NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> classBody) |
|
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.
|
EnumConstantDeclaration(String name) |
| Modifier and Type | Method | 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 |
clone() |
|
NodeList<Expression> |
getArguments() |
|
NodeList<BodyDeclaration<?>> |
getClassBody() |
|
EnumConstantDeclarationMetaModel |
getMetaModel() |
|
SimpleName |
getName() |
|
List<NodeList<?>> |
getNodeLists() |
The list of NodeLists owned by this node.
|
boolean |
remove(Node node) |
|
boolean |
replace(Node node,
Node replacementNode) |
|
EnumConstantDeclaration |
setArguments(NodeList<Expression> arguments) |
|
EnumConstantDeclaration |
setClassBody(NodeList<BodyDeclaration<?>> classBody) |
|
EnumConstantDeclaration |
setName(SimpleName name) |
getAnnotations, setAnnotationsgetAncestorOfTypeaddOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregisteraddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitaddArgument, addArgument, getArgument, setArgumentgetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocCommentcontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforegetNameAsString, setNamepublic EnumConstantDeclaration()
public EnumConstantDeclaration(String name)
public EnumConstantDeclaration(NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> classBody)
@Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator") 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)
Visitable@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<Expression> getArguments()
getArguments in interface NodeWithArguments<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<BodyDeclaration<?>> getClassBody()
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public SimpleName getName()
getName in interface NodeWithSimpleName<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setArguments(NodeList<Expression> arguments)
setArguments in interface NodeWithArguments<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setClassBody(NodeList<BodyDeclaration<?>> classBody)
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class BodyDeclaration<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class BodyDeclaration<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.CloneGenerator") public EnumConstantDeclaration clone()
clone in class BodyDeclaration<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator") public EnumConstantDeclarationMetaModel getMetaModel()
getMetaModel in class BodyDeclaration<EnumConstantDeclaration>@Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace in class BodyDeclaration<EnumConstantDeclaration>Copyright © 2007–2019. All rights reserved.