public final class AnnotationMemberDeclaration extends BodyDeclaration<AnnotationMemberDeclaration> implements NodeWithJavadoc<AnnotationMemberDeclaration>, NodeWithSimpleName<AnnotationMemberDeclaration>, NodeWithType<AnnotationMemberDeclaration,Type>, NodeWithPublicModifier<AnnotationMemberDeclaration>, NodeWithAbstractModifier<AnnotationMemberDeclaration>
@interface X { int id(); }
Node.ObserverRegistrationMode
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
AnnotationMemberDeclaration() |
AnnotationMemberDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue) |
AnnotationMemberDeclaration(EnumSet<Modifier> modifiers,
Type type,
String name,
Expression defaultValue) |
AnnotationMemberDeclaration(Range range,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue)
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.
|
AnnotationMemberDeclaration |
clone() |
Optional<Expression> |
getDefaultValue() |
AnnotationMemberDeclarationMetaModel |
getMetaModel() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this member declaration.
|
SimpleName |
getName() |
List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
Type |
getType()
Gets the type
|
boolean |
remove(Node node) |
AnnotationMemberDeclaration |
removeDefaultValue() |
AnnotationMemberDeclaration |
setDefaultValue(Expression defaultValue)
Sets the default value
|
AnnotationMemberDeclaration |
setModifiers(EnumSet<Modifier> modifiers) |
AnnotationMemberDeclaration |
setName(SimpleName name) |
AnnotationMemberDeclaration |
setType(Type type)
Sets the type
|
getAnnotations, setAnnotations
addOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeOrphanComment, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
getComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocComment
getNameAsString, setName
setType, setType, tryAddImportToParentCompilationUnit
isPublic, setPublic
isAbstract, setAbstract
addModifier, removeModifier, setModifier
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnit
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
public AnnotationMemberDeclaration()
public AnnotationMemberDeclaration(EnumSet<Modifier> modifiers, Type type, String name, Expression defaultValue)
public AnnotationMemberDeclaration(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public AnnotationMemberDeclaration(Range range, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, SimpleName name, Expression defaultValue)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- 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 Optional<Expression> getDefaultValue()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<AnnotationMemberDeclaration>
Modifier
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public SimpleName getName()
getName
in interface NodeWithSimpleName<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Type getType()
NodeWithType
getType
in interface NodeWithType<AnnotationMemberDeclaration,Type>
@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public AnnotationMemberDeclaration removeDefaultValue()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public AnnotationMemberDeclaration setDefaultValue(Expression defaultValue)
defaultValue
- the default value, can be null@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public AnnotationMemberDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public AnnotationMemberDeclaration setName(SimpleName name)
setName
in interface NodeWithSimpleName<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public AnnotationMemberDeclaration setType(Type type)
NodeWithType
setType
in interface NodeWithType<AnnotationMemberDeclaration,Type>
type
- the type@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
Node
getNodeLists
in class BodyDeclaration<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove
in class BodyDeclaration<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public AnnotationMemberDeclaration clone()
clone
in class BodyDeclaration<AnnotationMemberDeclaration>
@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public AnnotationMemberDeclarationMetaModel getMetaModel()
getMetaModel
in class BodyDeclaration<AnnotationMemberDeclaration>
Copyright © 2007–2017. All rights reserved.