java.lang.Object | |
↳ | sun.tools.tree.Context |
![]() |
WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create the initial context for a method
The incoming context is inherited from
| |||||||||||
Create a new context, for initializing a class.
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a field can reach another field (only considers
forward references, not the access modifiers).
| |||||||||||
Raise an error if a blank final was definitely unassigned
on entry to a loop, but has possibly been assigned on the
back-branch.
| |||||||||||
Declare local
| |||||||||||
Assign a number to a class field.
| |||||||||||
Return a local expression which can serve as the base reference
for the given field.
| |||||||||||
From which enclosing class do members of this type come?
| |||||||||||
Return the name of a lexically apparent type,
skipping inherited members, and ignoring
the current pacakge and imports.
| |||||||||||
Like getField, except that it skips over inherited fields.
| |||||||||||
Get the destination context of a break
| |||||||||||
Get the destination context of a continue
| |||||||||||
Return the local field or member field corresponding to a number.
| |||||||||||
Return the field containing the present context.
| |||||||||||
Get either a local variable, or a field in a current class
| |||||||||||
Retrieve a number previously assigned by declareMember().
| |||||||||||
Get the context that corresponds to a label, return null if
not found.
| |||||||||||
Get a local class by name
| |||||||||||
Get a local variable by name
| |||||||||||
Get the destination context of a return (the method body)
| |||||||||||
Get the scope number for a reference to a member of this class
(Larger scope numbers are more deeply nested.)
| |||||||||||
Return the number of the innermost current instance reference.
| |||||||||||
Get the context of the innermost surrounding try-block.
| |||||||||||
Check if the given field is active in this context.
| |||||||||||
Implement a reference (usually an uplevel one).
| |||||||||||
Extend an environment with the given context.
| |||||||||||
Notice a reference (usually an uplevel one).
| |||||||||||
Is there a "this" of type reqc in scope?
| |||||||||||
Remove variables from the vset set that are no longer part of
this context.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create the initial context for a method The incoming context is inherited from
Check if a field can reach another field (only considers forward references, not the access modifiers).
Raise an error if a blank final was definitely unassigned on entry to a loop, but has possibly been assigned on the back-branch. If this is the case, the loop may be assigning it multiple times.
Assign a number to a class field. (This is used to track definite assignment of some blank finals.)
Return a local expression which can serve as the base reference for the given field. If the field is a constructor, return an expression for the implicit enclosing instance argument.
Return null if there is no need for such an argument, or if there was an error.
From which enclosing class do members of this type come?
Return the name of a lexically apparent type, skipping inherited members, and ignoring the current pacakge and imports. This is used for error checking.
Like getField, except that it skips over inherited fields. Used for error checking.
AmbiguousMember | |
---|---|
ClassNotFound |
Return the local field or member field corresponding to a number. Return null if there is no such field.
Get either a local variable, or a field in a current class
AmbiguousMember | |
---|---|
ClassNotFound |
Retrieve a number previously assigned by declareMember(). Return -1 if there was no such assignment in this context.
Get the context that corresponds to a label, return null if not found.
Get the scope number for a reference to a member of this class (Larger scope numbers are more deeply nested.)
Return the number of the innermost current instance reference.
Get the context of the innermost surrounding try-block. Consider only try-blocks contained within the same method. (There could be others when searching from within a method of a local class, but they are irrelevant to our purpose.) This is used for recording DA/DU information preceding all abnormal transfers of control: break, continue, return, and throw.
Implement a reference (usually an uplevel one). Call noteReference() first, to make sure the reference lists are up to date.
The resulting expression tree does not need checking; it can be code-generated right away. If the reference is not uplevel, the result is an IDENT or THIS.
Extend an environment with the given context. The resulting environment behaves the same as the given one, except that resolveName() takes into account local class names in this context.
Notice a reference (usually an uplevel one). Update the references list of every enclosing class which is enclosed by the scope of the target. Update decisions about which uplevels to make into fields. Return the uplevel reference descriptor, or null if it's local.
The target must be in scope in this context. So, call this method only from the check phase. (In other phases, the context may be less complete.)
This can and should be called both before and after classes are frozen. It should be a no-op, and will raise a compiler error if not.
Is there a "this" of type reqc in scope?
Remove variables from the vset set that are no longer part of this context.