public class AnnotatedNodeUtils
extends Object
Utility class for working with AnnotatedNodes
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static boolean |
deemedInternal(AnnotatedNode node)Checks whether an AST node is deemed internal, either by name convention (contains $) or by being annotated with @Internal. |
|
public static boolean |
hasAnnotation(AnnotatedNode node, ClassNode annotation)Checks whether the supplied node carries the given annotation. |
|
public static boolean |
isGenerated(AnnotatedNode node)Checks whether the supplied node has been marked as generated. |
|
public static boolean |
isInternal(AnnotatedNode node)Checks whether a node is annotated with @Internal. |
<T extends AnnotatedNode> |
public static T |
markAsGenerated(ClassNode containingClass, T nodeToMark)Marks the supplied node with @Generated when generation metadata is available. |
<T extends AnnotatedNode> |
public static T |
markAsGenerated(ClassNode containingClass, T nodeToMark, boolean skipChecks)Marks the supplied node with @Generated. |
<T extends AnnotatedNode> |
public static T |
markAsInternal(T nodeToMark)Marks a node with the @Internal annotation. |
Checks whether an AST node is deemed internal, either by name convention
(contains $) or by being annotated with @Internal.
Checks whether the supplied node carries the given annotation.
node - the node to inspectannotation - the annotation type to look fortrue if the node has at least one matching annotationChecks whether the supplied node has been marked as generated.
node - the node to inspecttrue if the node carries @GeneratedChecks whether a node is annotated with @Internal.
Marks the supplied node with @Generated when generation metadata is available.
containingClass - the class currently receiving generated membersnodeToMark - the node to annotateMarks the supplied node with @Generated.
containingClass - the class currently receiving generated membersnodeToMark - the node to annotateskipChecks - whether to skip the usual source-context checksMarks a node with the @Internal annotation.