public final class AnnotationMemberDeclaration extends BodyDeclaration<AnnotationMemberDeclaration> implements NodeWithJavadoc<AnnotationMemberDeclaration>, NodeWithSimpleName<AnnotationMemberDeclaration>, NodeWithType<AnnotationMemberDeclaration,Type>, NodeWithModifiers<AnnotationMemberDeclaration>
@interface X { int id(); }Node.ObserverRegistrationModeABSOLUTE_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, setAnnotationsaddOrphanComment, 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, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitgetJavadoc, removeJavaDocComment, setJavadocComment, setJavadocComment, setJavadocCommentgetNameAsString, setNamesetType, setTypeaddModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatileaddAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotationgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic 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)
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 EnumSet<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 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)
NodeWithTypesetType in interface NodeWithType<AnnotationMemberDeclaration,Type>type - the typepublic JavadocComment getJavadocComment()
NodeWithJavadocgetJavadocComment in interface NodeWithJavadoc<AnnotationMemberDeclaration>Copyright © 2007–2017. All rights reserved.