| Modifier and Type | Method and Description |
|---|---|
static List<? extends @Nullable AnnotationMirror> |
annotationsFromArrayCreation(NewArrayTree node,
int level) |
static List<? extends @Nullable AnnotationMirror> |
annotationsFromTree(AnnotatedTypeTree node) |
static List<? extends @Nullable AnnotationMirror> |
annotationsFromTree(TypeParameterTree node) |
static List<@Nullable AnnotationMirror> |
annotationsFromTypeAnnotationTrees(List<? extends AnnotationTree> annos) |
static @NonNull ExecutableElement |
constructor(NewClassTree tree)
Determines the symbol for a constructor given an invocation via
new. |
static boolean |
isAnonymousConstructor(@Nullable MethodTree method)
Determines whether or not the node referred to by the given
TreePath is an anonymous constructor (the constructor for an
anonymous class. |
static @Nullable Element |
symbol(@Nullable Tree tree)
Gets the
Element ("symbol") for the given Tree API node. |
static TypeMirror |
typeOf(@Nullable Tree tree) |
public static @Nullable Element symbol(@Nullable Tree tree)
Element ("symbol") for the given Tree API node.tree - the Tree node to get the symbol for{@link Symbol} for the given tree, or null if one
could not be foundIllegalArgumentException - if tree is null or is not a valid javac-internal tree
(JCTree)public static boolean isAnonymousConstructor(@Nullable MethodTree method)
TreePath is an anonymous constructor (the constructor for an
anonymous class.method - the TreePath for a node that may be an anonymous
constructorpublic static @NonNull ExecutableElement constructor(NewClassTree tree)
new.
If the tree is a declaration of an anonymous class, then method returns
constructor that gets invoked in the extended class, rather than the
anonymous constructor implicitly added by the constructor (JLS 15.9.5.1)tree - the constructor invocationExecutableElement corresponding to the constructor
call in treepublic static final List<@Nullable AnnotationMirror> annotationsFromTypeAnnotationTrees(List<? extends AnnotationTree> annos)
public static final List<? extends @Nullable AnnotationMirror> annotationsFromTree(AnnotatedTypeTree node)
public static final List<? extends @Nullable AnnotationMirror> annotationsFromTree(TypeParameterTree node)
public static final List<? extends @Nullable AnnotationMirror> annotationsFromArrayCreation(NewArrayTree node, int level)
public static TypeMirror typeOf(@Nullable Tree tree)