value |= value >>> 16;
return bitCount(~value);
}
+
+ /**
+ * Returns an <code>Integer</code> object wrapping the value.
+ * In contrast to the <code>Integer</code> constructor, this method
+ * will cache some values. It is used by boxing conversion.
+ *
+ * @param val the value to wrap
+ * @return the <code>Integer</code>
+ */
+ public static Integer valueOf(int val)
+ {
+ //if (val < MIN_CACHE || val > MAX_CACHE)
+ return new Integer(val);
+ /*else
+ return intCache[val - MIN_CACHE];*/
+ }
}
}
}
if (oldstatus<INIT&&fullcheck>=INIT) {
- if (cd.isInnerClass()) {
+ /*if (cd.isInnerClass()) {
Modifiers fdmodifiers=new Modifiers();
FieldDescriptor enclosingfd=new FieldDescriptor(fdmodifiers,new TypeDescriptor(cd.getSurroundingDesc()),"this___enclosing",null,false);
cd.addField(enclosingfd);
- }
+ }*/
/* Check to see that fields are well typed */
for(Iterator field_it=cd.getFields(); field_it.hasNext(); ) {
if (fd==null){
if((md instanceof MethodDescriptor) && false == ((MethodDescriptor)md).isStaticBlock()) {
- ClassDescriptor cd = ((MethodDescriptor)md).getClassDesc();
- FieldAccessNode theFieldNode = fieldAccessExpression( cd, fieldname, fan.getNumLine() );
- if( null != theFieldNode ) {
- //fan = theFieldNode;
- checkFieldAccessNode( md, nametable, theFieldNode, td );
- fan.setField( theFieldNode.getField() );
- fan.setExpression( theFieldNode.getExpression() );
- //TypeDescriptor td1 = fan.getType();
- //td1.toString();
- return;
- }
- }
+ ClassDescriptor cd = ((MethodDescriptor)md).getClassDesc();
+ FieldAccessNode theFieldNode = fieldAccessExpression( cd, fieldname, fan.getNumLine() );
+ if( null != theFieldNode ) {
+ //fan = theFieldNode;
+ checkFieldAccessNode( md, nametable, theFieldNode, td );
+ fan.setField( theFieldNode.getField() );
+ fan.setExpression( theFieldNode.getExpression() );
+ //TypeDescriptor td1 = fan.getType();
+ //td1.toString();
+ return;
+ }
+ }
throw new Error("Unknown field "+fieldname + " in "+fan.printNode(0)+" in "+md);
- }
- if (fd==null) {
+ }
+ /*if (fd==null) {
ClassDescriptor surroundingCls=ltd.getClassDesc().getSurroundingDesc();
int numencloses=1;
while(surroundingCls!=null) {
if (fd==null)
throw new Error("Unknown field "+fieldname + " in "+fan.printNode(0)+" in "+md);
- }
+ }*/
if (fd.getType().iswrapper()) {
outerprint();
t tmp=new t();
tmp.print();
+ outerAnonymousInner(100);
}
public void outerprint() {
System.out.println("Outer class print: " + this.outer + "; " + this.f2);
}
+
+ public void outerprintInnerp(innerCallback c) {
+ c.call();
+ }
+
+ public void outerAnonymousInner(final int value) {
+ this.outerprintInnerp(new innerCallback() {
+ public void call() {
+ System.out.println("innerCallback: " + value);
+ }
+ });
+ }
public class t extends innerpt {
int outer;