|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.util.InternalUtils
@DefaultQualifier(value="checkers.nullness.quals.NonNull") public class InternalUtils
Static utility methods used by annotation abstractions in this package. Some methods in this class depend on the use of Sun javac internals; any procedure in the Checker Framework that uses a non-public API should be placed here.
Method Summary | |
---|---|
static List<? extends AnnotationMirror> |
annotationsFromArrayCreation(NewArrayTree node,
int level)
|
static List<? extends AnnotationMirror> |
annotationsFromTree(AnnotatedTypeTree node)
|
static ExecutableElement |
constructor(NewClassTree tree)
Determines the symbol for a constructor given an invocation via new . |
static boolean |
isAnonymousConstructor(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 Element |
symbol(Tree tree)
Gets the Element ("symbol") for the given Tree API node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Element symbol(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 found
IllegalArgumentException
- if tree
is null or is not a valid javac-internal tree
(JCTree)public static boolean isAnonymousConstructor(MethodTree method)
TreePath
is an anonymous constructor (the constructor for an
anonymous class.
method
- the TreePath
for a node that may be an anonymous
constructor
public static 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 invocation
ExecutableElement
corresponding to the constructor
call in tree
public static final List<? extends AnnotationMirror> annotationsFromTree(AnnotatedTypeTree node)
public static final List<? extends AnnotationMirror> annotationsFromArrayCreation(NewArrayTree node, int level)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |