| java.lang.Object jode.decompiler.OuterValues
OuterValues | public class OuterValues (Code) | | OuterValues are used in method scoped classes: If a method
scoped class uses a local of the surrounding method, the java
compiler adds the locals to the param list of each constructor
of the method scoped class. Each invocation of the constructor
must give the correct values for these locals.
These extra parameters are the outerValues.
The main problem here is, that we don't know immediately if a
parameter is a standard parameter or a local of the outer
method. We may shrink this array if we notice a problem later.
Every class interested in outer values, may register itself
as OuterValueListener. It will then be notified every time the
outer values shrink.
The outer instance of a non static _class_ scoped class is not
considered as outer value, mainly because it can be changed. With
jikes method scoped classes also have an outer class instance, but
that is considered as outer value.
Under jikes anonymous classes that extends class or method scoped
classes have as last parameter the outer instance of the parent
class. This should really be the first parameter (just after the
outerValues), like it is under javac. We mark such classes as
jikesAnonymousInner. This is done in the initialize() pass.
Under javac the outer class paramter for anonymous classes that
extends class scoped classes is at the right position, just before
the other parameters.
See Also: OuterValues.shrinkOuterValues See Also: OuterValues.addOuterValueListener since: 1.0.93 |
getCount | public int getCount()(Code) | | |
getValueBySlot | public Expression getValueBySlot(int slot)(Code) | | Get the outer value corresponding to a given slot. This will
also adjust the minSlot value. This only considers head slots.
index into outerValues array or -1, if not matched. |
isImplicitOuterClass | public boolean isImplicitOuterClass()(Code) | | Javac 1.3 doesn't give an outer class reference for anonymous
classes that extend inner classes, provided the outer class is
the normal this parameter. Instead it takes a normal outer
value parameter for this. This method tells if this is such a
class.
|
isJikesAnonymousInner | public boolean isJikesAnonymousInner()(Code) | | Jikes gives the outer class reference in an unusual place (as last
parameter) for anonymous classes that extends an inner (or method
scope) class. This method tells if this is such a class.
|
setCount | public void setCount(int newHeadCount)(Code) | | |
setImplicitOuterClass | public void setImplicitOuterClass(boolean value)(Code) | | |
setJikesAnonymousInner | public void setJikesAnonymousInner(boolean value)(Code) | | Jikes gives the outer class reference in an unusual place (as last
parameter) for anonymous classes that extends an inner (or method
scope) class. This method tells if this is such a class.
|
setMinCount | public void setMinCount(int newMin)(Code) | | |
unifyOuterValues | public boolean unifyOuterValues(int nr, Expression otherExpr)(Code) | | |
|
|