public final class AnnotationMemberDeclaration extends BodyDeclaration<AnnotationMemberDeclaration> implements NodeWithJavadoc<AnnotationMemberDeclaration>, NodeWithSimpleName<AnnotationMemberDeclaration>, NodeWithType<AnnotationMemberDeclaration,Type>, NodeWithPublicModifier<AnnotationMemberDeclaration>, NodeWithAbstractModifier<AnnotationMemberDeclaration>, Resolvable<ResolvedAnnotationMemberDeclaration>
@interface X { int id(); }
All annotations preceding the type will be set on this object, not on the type. JavaParser doesn't know if it
they are applicable to the method or the type.
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 |
|---|
AnnotationMemberDeclaration() |
AnnotationMemberDeclaration(NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue) |
AnnotationMemberDeclaration(NodeList<Modifier> modifiers,
Type type,
String name,
Expression defaultValue) |
AnnotationMemberDeclaration(TokenRange tokenRange,
NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue)
This constructor is used by the parser and is considered private.
|
asAnnotationDeclaration, asCallableDeclaration, asClassOrInterfaceDeclaration, asConstructorDeclaration, asEnumConstantDeclaration, asEnumDeclaration, asFieldDeclaration, asInitializerDeclaration, asMethodDeclaration, asTypeDeclaration, getAnnotations, ifAnnotationDeclaration, ifCallableDeclaration, ifClassOrInterfaceDeclaration, ifConstructorDeclaration, ifEnumConstantDeclaration, ifEnumDeclaration, ifFieldDeclaration, ifInitializerDeclaration, ifMethodDeclaration, ifTypeDeclaration, isAnnotationDeclaration, isCallableDeclaration, isClassOrInterfaceDeclaration, isConstructorDeclaration, isEnumConstantDeclaration, isEnumDeclaration, isFieldDeclaration, isInitializerDeclaration, isMethodDeclaration, isTypeDeclaration, setAnnotations, toAnnotationDeclaration, toCallableDeclaration, toClassOrInterfaceDeclaration, toConstructorDeclaration, toEnumConstantDeclaration, 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, setNamegetTypeAsString, setType, setType, tryAddImportToParentCompilationUnitisPublic, setPublicisAbstract, setAbstractaddModifier, getAccessSpecifier, hasModifier, removeModifier, setModifier, setModifiersaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitfindAncestor, findAncestorcontainsWithin, getBegin, getEndpublic AnnotationMemberDeclaration()
public AnnotationMemberDeclaration(NodeList<Modifier> modifiers, Type type, String name, Expression defaultValue)
public AnnotationMemberDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
public AnnotationMemberDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
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 Optional<Expression> getDefaultValue()
public NodeList<Modifier> getModifiers()
getModifiers in interface NodeWithModifiers<AnnotationMemberDeclaration>Modifierpublic SimpleName getName()
getName in interface NodeWithSimpleName<AnnotationMemberDeclaration>public Type getType()
NodeWithTypegetType in interface NodeWithType<AnnotationMemberDeclaration,Type>public AnnotationMemberDeclaration removeDefaultValue()
public AnnotationMemberDeclaration setDefaultValue(Expression defaultValue)
defaultValue - the default value, can be nullpublic AnnotationMemberDeclaration setModifiers(NodeList<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<AnnotationMemberDeclaration>public AnnotationMemberDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<AnnotationMemberDeclaration>public AnnotationMemberDeclaration setType(Type type)
NodeWithTypesetType in interface NodeWithType<AnnotationMemberDeclaration,Type>type - the typepublic boolean remove(Node node)
remove in class BodyDeclaration<AnnotationMemberDeclaration>public AnnotationMemberDeclaration clone()
clone in class BodyDeclaration<AnnotationMemberDeclaration>public AnnotationMemberDeclarationMetaModel getMetaModel()
getMetaModel in class BodyDeclaration<AnnotationMemberDeclaration>public boolean replace(Node node, Node replacementNode)
replace in class BodyDeclaration<AnnotationMemberDeclaration>public boolean isAnnotationMemberDeclaration()
isAnnotationMemberDeclaration in class BodyDeclaration<AnnotationMemberDeclaration>public AnnotationMemberDeclaration asAnnotationMemberDeclaration()
asAnnotationMemberDeclaration in class BodyDeclaration<AnnotationMemberDeclaration>public void ifAnnotationMemberDeclaration(Consumer<AnnotationMemberDeclaration> action)
ifAnnotationMemberDeclaration in class BodyDeclaration<AnnotationMemberDeclaration>public ResolvedAnnotationMemberDeclaration resolve()
resolve in interface Resolvable<ResolvedAnnotationMemberDeclaration>public Optional<AnnotationMemberDeclaration> toAnnotationMemberDeclaration()
toAnnotationMemberDeclaration in class BodyDeclaration<AnnotationMemberDeclaration>Copyright © 2007–2019. All rights reserved.