Home » openjdk-7 » com.sun.tools » javac » tree » [javadoc | source]
com.sun.tools.javac.tree
public class: TreeInfo [javadoc | source]
java.lang.Object
   com.sun.tools.javac.tree.TreeInfo
Utility class containing inspector methods for trees.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Field Summary
protected static final  Key<TreeInfo> treeInfoKey     
public static final  int notExpression    Operator precedences values. 
public static final  int noPrec     
public static final  int assignPrec     
public static final  int assignopPrec     
public static final  int condPrec     
public static final  int orPrec     
public static final  int andPrec     
public static final  int bitorPrec     
public static final  int bitxorPrec     
public static final  int bitandPrec     
public static final  int eqPrec     
public static final  int ordPrec     
public static final  int shiftPrec     
public static final  int addPrec     
public static final  int mulPrec     
public static final  int prefixPrec     
public static final  int postfixPrec     
public static final  int precCount     
Method from com.sun.tools.javac.tree.TreeInfo Summary:
calledMethodName,   declarationFor,   diagEndPos,   diagnosticPositionFor,   endPos,   finalizerPos,   firstConstructorCall,   firstFlag,   firstStatPos,   flagNames,   flags,   fullName,   getEndPos,   getStartPos,   hasConstructors,   innermostType,   instance,   isConstructor,   isDeclaration,   isDiamond,   isInitialConstructor,   isMultiCatch,   isNull,   isSelfCall,   isSuperCall,   isSyntheticInit,   name,   nonstaticSelect,   opPrec,   operatorName,   pathFor,   positionFor,   referencedStatement,   scopeFor,   scopeFor,   setSymbol,   skipParens,   skipParens,   symbol,   symbolFor,   tagToKind,   typeIn,   types
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.tree.TreeInfo Detail:
 public static Name calledMethodName(JCTree tree) 
    If the expression is a method call, return the method name, null otherwise.
 public static JCTree declarationFor(Symbol sym,
    JCTree tree) 
    Find the declaration for a symbol, where that symbol is defined somewhere in the given tree.
 public static DiagnosticPosition diagEndPos(JCTree tree) 
    A DiagnosticPosition with the preferred position set to the end position of given tree, if it is a block with defined endpos.
 public static DiagnosticPosition diagnosticPositionFor(Symbol sym,
    JCTree tree) 
    Find the position for reporting an error about a symbol, where that symbol is defined somewhere in the given tree.
 public static int endPos(JCTree tree) 
    The end position of given tree, if it is a block with defined endpos.
 public static int finalizerPos(JCTree tree) 
    The position of the finalizer of given try/synchronized statement.
 public static JCMethodInvocation firstConstructorCall(JCTree tree) 
    Return the first call in a constructor definition.
 public static long firstFlag(long flags) 
    Return first (smallest) flag in `flags': pre: flags != 0
 public static int firstStatPos(JCTree tree) 
    The position of the first statement in a block, or the position of the block itself if it is empty.
 public static String flagNames(long flags) 
    Return flags as a string, separated by " ".
 public static long flags(JCTree tree) 
    If this tree is a declaration or a block, return its flags field, otherwise return 0.
 public static Name fullName(JCTree tree) 
    If this tree is a qualified identifier, its return fully qualified name, otherwise return null.
 public static int getEndPos(JCTree tree,
    Map<JCTree, Integer> endPositions) 
    The end position of given tree, given a table of end positions generated by the parser
 public static int getStartPos(JCTree tree) 
    Get the start position for a tree node. The start position is defined to be the position of the first character of the first token of the node's source text.
 public static boolean hasConstructors(List<JCTree> trees) 
    Is there a constructor declaration in the given list of trees?
 public static JCTree innermostType(JCTree type) 
 public static TreeInfo instance(Context context) 
 public static boolean isConstructor(JCTree tree) 
    Is tree a constructor declaration?
 public static boolean isDeclaration(JCTree node) 
 public static boolean isDiamond(JCTree tree) 
    Return true if a tree represents a diamond new expr.
 public static boolean isInitialConstructor(JCTree tree) 
    Is this a constructor whose first (non-synthetic) statement is not of the form this(...)?
 public static boolean isMultiCatch(JCCatch catchClause) 
 public static boolean isNull(JCTree tree) 
    Return true if a tree represents the null literal.
 public static boolean isSelfCall(JCTree tree) 
    Is this a call to this or super?
 public static boolean isSuperCall(JCTree tree) 
    Is this a call to super?
 public static boolean isSyntheticInit(JCTree stat) 
    Is statement an initializer for a synthetic field?
 public static Name name(JCTree tree) 
    If this tree is an identifier or a field or a parameterized type, return its name, otherwise return null.
 public static boolean nonstaticSelect(JCTree tree) 
    Return true if this is a nonstatic selection.
 public static int opPrec(int op) 
    Map operators to their precedence levels.
 public Name operatorName(int tag) 
    Return name of operator with given tree tag.
 public static List<JCTree> pathFor(JCTree node,
    JCCompilationUnit unit) 
 public static int positionFor(Symbol sym,
    JCTree tree) 
    Find the position for reporting an error about a symbol, where that symbol is defined somewhere in the given tree.
 public static JCTree referencedStatement(JCLabeledStatement tree) 
    Return the statement referenced by a label. If the label refers to a loop or switch, return that switch otherwise return the labelled statement itself
 public static Env<AttrContext> scopeFor(List<JCTree> path) 
 public static Env<AttrContext> scopeFor(JCTree node,
    JCCompilationUnit unit) 
 public static  void setSymbol(JCTree tree,
    Symbol sym) 
    If this tree is an identifier or a field, set its symbol, otherwise skip.
 public static JCExpression skipParens(JCExpression tree) 
    Skip parens and return the enclosed expression
 public static JCTree skipParens(JCTree tree) 
    Skip parens and return the enclosed expression
 public static Symbol symbol(JCTree tree) 
    If this tree is an identifier or a field, return its symbol, otherwise return null.
 public static Symbol symbolFor(JCTree node) 
 static Kind tagToKind(int tag) 
 public static JCExpression typeIn(JCExpression tree) 
    Returns the underlying type of the tree if it is annotated type, or the tree itself otherwise
 public static List<Type> types(List<JCTree> trees) 
    Return the types of a list of trees.