public class AnnotationDeclaration extends TypeDeclaration<AnnotationDeclaration> implements NodeWithAbstractModifier<AnnotationDeclaration>, Resolvable<ResolvedAnnotationDeclaration>
@interface X { ... }
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
AnnotationDeclaration() |
AnnotationDeclaration(NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members) |
AnnotationDeclaration(NodeList<Modifier> modifiers,
String name) |
AnnotationDeclaration(TokenRange tokenRange,
NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members)
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.
|
FieldDeclaration |
addField(Type type,
String name,
Modifier.Keyword... modifiers)
Add a field to this.
|
AnnotationDeclaration |
asAnnotationDeclaration() |
AnnotationDeclaration |
clone() |
AnnotationDeclarationMetaModel |
getMetaModel() |
void |
ifAnnotationDeclaration(Consumer<AnnotationDeclaration> action) |
boolean |
isAnnotationDeclaration() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
ResolvedAnnotationDeclaration |
resolve() |
Optional<AnnotationDeclaration> |
toAnnotationDeclaration() |
addMember, asTypeDeclaration, getCallablesWithSignature, getFullyQualifiedName, getMembers, getModifiers, getName, ifTypeDeclaration, isNestedType, isTopLevelType, isTypeDeclaration, setMembers, setModifiers, setName, toTypeDeclaration
asAnnotationMemberDeclaration, asCallableDeclaration, asClassOrInterfaceDeclaration, asConstructorDeclaration, asEnumConstantDeclaration, asEnumDeclaration, asFieldDeclaration, asInitializerDeclaration, asMethodDeclaration, getAnnotations, ifAnnotationMemberDeclaration, ifCallableDeclaration, ifClassOrInterfaceDeclaration, ifConstructorDeclaration, ifEnumConstantDeclaration, ifEnumDeclaration, ifFieldDeclaration, ifInitializerDeclaration, ifMethodDeclaration, isAnnotationMemberDeclaration, isCallableDeclaration, isClassOrInterfaceDeclaration, isConstructorDeclaration, isEnumConstantDeclaration, isEnumDeclaration, isFieldDeclaration, isInitializerDeclaration, isMethodDeclaration, setAnnotations, toAnnotationMemberDeclaration, toCallableDeclaration, toClassOrInterfaceDeclaration, toConstructorDeclaration, toEnumConstantDeclaration, toEnumDeclaration, toFieldDeclaration, toInitializerDeclaration, toMethodDeclaration
addOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isAncestorOf, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
isAbstract, setAbstract
addModifier, getAccessSpecifier, getModifiers, hasModifier, removeModifier, setModifier, setModifiers, setModifiers
getComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocComment, setJavadocComment
addConstructor, addField, addField, addFieldWithInitializer, addFieldWithInitializer, addFieldWithInitializer, addInitializer, addMethod, addPrivateField, addPrivateField, addPrivateField, addProtectedField, addProtectedField, addProtectedField, addPublicField, addPublicField, addPublicField, addStaticInitializer, getConstructorByParameterTypes, getConstructorByParameterTypes, getConstructors, getDefaultConstructor, getFieldByName, getFields, getMember, getMethods, getMethodsByName, getMethodsByParameterTypes, getMethodsByParameterTypes, getMethodsBySignature, isEmpty, setMember, tryAddImportToParentCompilationUnit
getNameAsExpression, getNameAsString, setName
isPublic, setPublic
isPrivate, setPrivate
isProtected, setProtected
isStatic, setStatic
isStrictfp, setStrictfp
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnit
findAncestor, findAncestor, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd
public AnnotationDeclaration()
public AnnotationDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<BodyDeclaration<?>> members)
public AnnotationDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<BodyDeclaration<?>> members)
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 boolean remove(Node node)
remove
in class TypeDeclaration<AnnotationDeclaration>
public AnnotationDeclaration clone()
clone
in class TypeDeclaration<AnnotationDeclaration>
public AnnotationDeclarationMetaModel getMetaModel()
getMetaModel
in class TypeDeclaration<AnnotationDeclaration>
public boolean replace(Node node, Node replacementNode)
replace
in class TypeDeclaration<AnnotationDeclaration>
public boolean isAnnotationDeclaration()
isAnnotationDeclaration
in class BodyDeclaration<AnnotationDeclaration>
public AnnotationDeclaration asAnnotationDeclaration()
asAnnotationDeclaration
in class BodyDeclaration<AnnotationDeclaration>
public void ifAnnotationDeclaration(Consumer<AnnotationDeclaration> action)
ifAnnotationDeclaration
in class BodyDeclaration<AnnotationDeclaration>
public ResolvedAnnotationDeclaration resolve()
resolve
in interface Resolvable<ResolvedAnnotationDeclaration>
resolve
in class TypeDeclaration<AnnotationDeclaration>
public Optional<AnnotationDeclaration> toAnnotationDeclaration()
toAnnotationDeclaration
in class BodyDeclaration<AnnotationDeclaration>
public FieldDeclaration addField(Type type, String name, Modifier.Keyword... modifiers)
NodeWithMembers
addField
in interface NodeWithMembers<AnnotationDeclaration>
type
- the type of the fieldname
- the name of the fieldmodifiers
- the modifiers like Modifier.Keyword#PUBLIC
FieldDeclaration
createdCopyright © 2007–2020. All rights reserved.