public final class AnnotationMemberDeclaration extends BodyDeclaration<AnnotationMemberDeclaration> implements NodeWithJavadoc<AnnotationMemberDeclaration>, NodeWithSimpleName<AnnotationMemberDeclaration>, NodeWithType<AnnotationMemberDeclaration,Type>, NodeWithModifiers<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) |
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.
|
Optional<Expression> |
getDefaultValue() |
JavadocComment |
getJavadocComment()
Gets the JavadocComment for this node.
|
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this member declaration.
|
SimpleName |
getName() |
Type |
getType()
Gets the type
|
Expression |
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, getNodeLists, setAnnotations
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, hasJavaDocComment, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeOrphanComment, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
getJavadoc, removeJavaDocComment, setJavadocComment, setJavadocComment, setJavadocComment
getNameAsString, setName
setType, setType
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
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)
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
public Optional<Expression> getDefaultValue()
public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<AnnotationMemberDeclaration>
Modifier
public SimpleName getName()
getName
in interface NodeWithSimpleName<AnnotationMemberDeclaration>
public Type getType()
NodeWithType
getType
in interface NodeWithType<AnnotationMemberDeclaration,Type>
public Expression removeDefaultValue()
public AnnotationMemberDeclaration setDefaultValue(Expression defaultValue)
defaultValue
- the default value, can be nullpublic AnnotationMemberDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<AnnotationMemberDeclaration>
public AnnotationMemberDeclaration setName(SimpleName name)
setName
in interface NodeWithSimpleName<AnnotationMemberDeclaration>
public AnnotationMemberDeclaration setType(Type type)
NodeWithType
setType
in interface NodeWithType<AnnotationMemberDeclaration,Type>
type
- the typepublic JavadocComment getJavadocComment()
NodeWithJavadoc
getJavadocComment
in interface NodeWithJavadoc<AnnotationMemberDeclaration>
Copyright © 2007–2017. All rights reserved.