|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.javac.comp.Env<A>
public class Env<A>
A class for environments, instances of which are passed as arguments to tree visitors. Environments refer to important ancestors of the subtree that's currently visited, such as the enclosing method, the enclosing class, or the enclosing toplevel node. They also contain a generic component, represented as a type parameter, to carry further information specific to individual passes.
This is NOT part of any API supported by Sun Microsystems. 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 | |
---|---|
boolean |
baseClause
Is this an environment for evaluating a base clause? |
List<JCTree.JCExpression> |
enclBrackets
A list of all enclosing brackets, innermost to outermost |
JCTree.JCClassDecl |
enclClass
The next enclosing class definition. |
JCTree.JCMethodDecl |
enclMethod
The next enclosing method definition. |
JCTree |
escape
The escape under which we are operating, or null if there was no escape or if we entered a bracket inside an escape. |
int |
escapeCount
|
A |
info
A generic field for further information. |
Env<A> |
next
The next enclosing environment. |
Env<A> |
outer
The environment enclosing the current class. |
JCTree.JCCompilationUnit |
toplevel
The enclosing toplevel tree. |
JCTree |
tree
The tree with which this environment is associated. |
Constructor Summary | |
---|---|
Env(JCTree tree,
A info)
Create an outermost environment for a given (toplevel)tree, with a given info field. |
Method Summary | |
---|---|
Env<A> |
dup(JCTree tree)
Duplicate this environment, updating with given tree, and copying all other fields. |
Env<A> |
dup(JCTree tree,
A info)
Duplicate this environment, updating with given tree and info, and copying all other fields. |
Env<A> |
dupBracket(JCTree tree,
A info,
JCTree.JCExpression bracket)
Duplicate this environment, updating with given tree and info and adding a new bracket to enclBrackets, copying all other fields. |
Env<A> |
dupBracket(JCTree tree,
JCTree.JCExpression bracket)
Duplicate this environment, updating with given tree and adding a new bracket to enclBrackets, copying all other fields. |
Env<A> |
dupEscape(JCTree tree)
Duplicate this environment, updating with given tree and removing the most recent bracket from enclBrackets, copying all other fields. |
Env<A> |
dupEscape(JCTree tree,
A info)
Duplicate this environment, updating with given tree and info and removing the most recent bracket from enclBrackets, copying all other fields. |
Env<A> |
dupto(Env<A> that)
Duplicate this environment into a given Environment, using its tree and info, and copying all other fields. |
Env<A> |
enclosing(int tag)
Return closest enclosing environment which points to a tree with given tag. |
int |
getLevel()
|
boolean |
isEscapeSafe()
|
java.util.Iterator<Env<A>> |
iterator()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Env<A> next
public Env<A> outer
public JCTree tree
public JCTree.JCCompilationUnit toplevel
public JCTree.JCClassDecl enclClass
public JCTree.JCMethodDecl enclMethod
public List<JCTree.JCExpression> enclBrackets
public JCTree escape
public int escapeCount
public A info
public boolean baseClause
Constructor Detail |
---|
public Env(JCTree tree, A info)
Method Detail |
---|
public Env<A> dup(JCTree tree, A info)
public Env<A> dupto(Env<A> that)
public Env<A> dup(JCTree tree)
public Env<A> dupBracket(JCTree tree, A info, JCTree.JCExpression bracket)
public Env<A> dupBracket(JCTree tree, JCTree.JCExpression bracket)
public Env<A> dupEscape(JCTree tree, A info)
public Env<A> dupEscape(JCTree tree)
public int getLevel()
public boolean isEscapeSafe()
public Env<A> enclosing(int tag)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<Env<A>> iterator()
iterator
in interface java.lang.Iterable<Env<A>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |