public 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 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 |
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) |
EnumConstantDeclaration |
setArguments(NodeList<Expression> arguments) |
EnumConstantDeclaration |
setClassBody(NodeList<BodyDeclaration<?>> classBody) |
EnumConstantDeclaration |
setName(SimpleName name) |
getAnnotations, setAnnotationsaddOrphanComment, 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, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitgetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocCommentgetNameAsString, setNameaddArgument, addArgument, getArgument, setArgumentaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfcontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforepublic EnumConstantDeclaration()
public EnumConstantDeclaration(String name)
public EnumConstantDeclaration(NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> classBody)
@Generated(value="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(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<Expression> getArguments()
getArguments in interface NodeWithArguments<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<BodyDeclaration<?>> getClassBody()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public SimpleName getName()
getName in interface NodeWithSimpleName<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setArguments(NodeList<Expression> arguments)
setArguments in interface NodeWithArguments<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setClassBody(NodeList<BodyDeclaration<?>> classBody)
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public EnumConstantDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class BodyDeclaration<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class BodyDeclaration<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public EnumConstantDeclaration clone()
clone in class BodyDeclaration<EnumConstantDeclaration>@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public EnumConstantDeclarationMetaModel getMetaModel()
getMetaModel in class BodyDeclaration<EnumConstantDeclaration>Copyright © 2007–2017. All rights reserved.