AnnotationDeclaration
open class AnnotationDeclaration : TypeDeclaration<AnnotationDeclaration> , NodeWithAbstractModifier<AnnotationDeclaration> , Resolvable<ResolvedAnnotationDeclaration> (source)
An annotation type declaration.@interface X { ... }
Author
Julio Vilmar Gesser
Constructors
Link copied to clipboard
constructor()
constructor(modifiers: NodeList<Modifier>, annotations: NodeList<AnnotationExpr>, name: SimpleName, members: NodeList<BodyDeclaration<out Any>>)
constructor(tokenRange: TokenRange, modifiers: NodeList<Modifier>, annotations: NodeList<AnnotationExpr>, name: SimpleName, members: NodeList<BodyDeclaration<out Any>>)
This constructor is used by the parser and is considered private.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This can be used to sort nodes on position.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Annotates this node and automatically add the import
Annotates this
Link copied to clipboard
Annotates this node and automatically add the import
Annotates this
Link copied to clipboard
Adds a constructor to this node with members.
Link copied to clipboard
Add a field to this.
open fun addField(typeClass: Class<out Any>, name: String, modifiers: Array<Modifier.Keyword>): FieldDeclaration
Add a field to this and automatically add the import of the type if needed
Link copied to clipboard
open fun addFieldWithInitializer(type: Type, name: String, initializer: Expression, modifiers: Array<Modifier.Keyword>): FieldDeclaration
open fun addFieldWithInitializer(type: String, name: String, initializer: Expression, modifiers: Array<Modifier.DefaultKeyword>): FieldDeclaration
Add a field to this.
open fun addFieldWithInitializer(typeClass: Class<out Any>, name: String, initializer: Expression, modifiers: Array<Modifier.DefaultKeyword>): FieldDeclaration
Add a field to this and automatically add the import of the type if needed
Link copied to clipboard
Add an initializer block (InitializerDeclaration) to this.
Link copied to clipboard
Annotates this with a marker annotation and automatically add the import
Annotates this with a marker annotation
Link copied to clipboard
Adds the given declaration to the specified type.
Link copied to clipboard
Adds a methods with void return by default to this.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Add a private field to this.
Add a private field to this and automatically add the import of the type if needed.
Link copied to clipboard
Add a protected field to this.
Add a protected field to this and automatically add the import of the type if needed.
Link copied to clipboard
Add a public field to this.
Add a public field to this and automatically add the import of the type if needed.
Link copied to clipboard
Annotates this with a single member annotation
Annotates this with a single member annotation and automatically add the import
Link copied to clipboard
Add a static initializer block (InitializerDeclaration) to this.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Checks whether the range of the given
Node is contained within the range of this NodeWithRange.Link copied to clipboard
Walks the AST with pre-order traversal, returning all nodes of type "nodeType".
Walks the AST with specified traversal order, returning all nodes of type "nodeType".
Walks the AST with pre-order traversal, returning all nodes of type "nodeType" that match the predicate.
Link copied to clipboard
Walks the parents of this node and returns the first node of type
type, or empty() if none is found.Walks the parents of this node and returns the first node of type
type that matches predicate, or empty() if none is found.Walks the parents of this node and returns the first node that matches one of types
types, or empty() if none is found.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Walks the AST with pre-order traversal, returning the first node of type "nodeType" or empty() if none is found.
Walks the AST, applying the function for every node, with traversal algorithm "traversal".
Walks the AST with pre-order traversal, returning the first node of type "nodeType" that matches "predicate" or empty() if none is found.
Link copied to clipboard
Finds the root node of this AST by finding the topmost parent.
Link copied to clipboard
Link copied to clipboard
This is the list of Comment which are contained in the Node either because they are properly associated to one of its children or because they are floating around inside the Node
Link copied to clipboard
Link copied to clipboard
Try to find an annotation by its class
Link copied to clipboard
Try to find an annotation by its name
Link copied to clipboard
This field is used by key to associated (JML) comments to this node.
Link copied to clipboard
open fun getCallablesWithSignature(signature: CallableDeclaration.Signature): List<CallableDeclaration<out Any>>
Link copied to clipboard
Contains all nodes that have this node set as their parent.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getConstructorByParameterTypes(paramTypes: Array<Class<out Any>>): Optional<ConstructorDeclaration>
open fun getConstructorByParameterTypes(paramTypes: Array<String>): Optional<ConstructorDeclaration>
Try to find a ConstructorDeclaration by its parameter types.
Link copied to clipboard
Find all constructors in the members of this node.
Link copied to clipboard
This method was added to support the clone method.
Link copied to clipboard
Try to find a ConstructorDeclaration with no parameters.
Link copied to clipboard
Try to find a FieldDeclaration by its name
Link copied to clipboard
Find all fields in the members of this node.
Link copied to clipboard
Returns the fully qualified name of this type, derived only from information available in this compilation unit.
Link copied to clipboard
Gets the Javadoc for this node.
Link copied to clipboard
Gets the JavadocComment for this node.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Find all methods in the members of this node.
Link copied to clipboard
Try to find a MethodDeclaration by its name
Link copied to clipboard
Try to find a MethodDeclaration by its parameter types.
Link copied to clipboard
Try to find MethodDeclarations by their name and parameter types.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This is a list of Comment which are inside the node and are not associated with any meaningful AST Node.
Link copied to clipboard
Returns the parent node, or
Optional.empty if no parent is set.Link copied to clipboard
Returns the parent node from the perspective of the children of this node.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns true if the parent has a parent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Determines whether this node is an ancestor of the given node.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Check whether an annotation with this class is present on this element
Check whether an annotation with this name is present on this element
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Determines whether this
HasParentNode node is a descendant of the given node.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Was this observer registered?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Register an observer.
Register a new observer for the given node.
Link copied to clipboard
Register the observer for the current node and all the contained node and nodelists, recursively.
Link copied to clipboard
Link copied to clipboard
Remove data by key.
Link copied to clipboard
Forcibly removes this node from the AST.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setAssociatedSpecificationComments(@Nullable associatedSpecificationComments: @Nullable NodeList<Comment>): Node
Link copied to clipboard
Use this to store additional information to this node.
Link copied to clipboard
Set a JavadocComment for this node
Link copied to clipboard
Use this to store additional information to this node.
Link copied to clipboard
Link copied to clipboard
Creates a list of modifier nodes corresponding to the keywords passed, and set it.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Unregister an observer.
Link copied to clipboard
Walks the AST, calling the consumer for every node with pre-order traversal.
Walks the AST, calling the consumer for every node, with traversal algorithm "traversal".
Walks the AST with pre-order traversal, calling the consumer for every node of type "nodeType".