ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

escjava.translate
Class Inner

java.lang.Object
  extended byescjava.translate.Inner

public class Inner
extends java.lang.Object

* This class contains a number of routines used in the * interpretation of Java 1.1 as Java 1.0. *


Field Summary
private static ASTDecoration enclosingInstanceArgument
          * Decorates ConstructorDecl nodes to point to their enclosing-instance- * field argument (this$0arg).
private static ASTDecoration enclosingInstanceDecoration
          * Decorates TypeSig nodes to point to their enclosing instance * field (this$0).
(package private) static GenericVarDecl firstThis0
          * If non-null, the local variable or formal to use instead of * this.this$0 when unfolding .this's.
 
Constructor Summary
Inner()
           
 
Method Summary
static FormalParaDecl getEnclosingInstanceArg(ConstructorDecl cd)
          * Return the FormalParaDecl for a given inner-class constructor's * enclosing-instance-field argument (this$0arg).
static FieldDecl getEnclosingInstanceField(TypeSig T)
          * Return the FieldDecl for a given non-top-level TypeSig's * enclosing instance field (this$0).
(package private) static Expr unfoldThis(ThisExpr t)
          * Converts a 1.1 ThisExpr of the form .this into an Java * 1.0 expression of the form this.this$0.this$0.this$0...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enclosingInstanceDecoration

private static final ASTDecoration enclosingInstanceDecoration
* Decorates TypeSig nodes to point to their enclosing instance * field (this$0).


enclosingInstanceArgument

private static final ASTDecoration enclosingInstanceArgument
* Decorates ConstructorDecl nodes to point to their enclosing-instance- * field argument (this$0arg).


firstThis0

static GenericVarDecl firstThis0
* If non-null, the local variable or formal to use instead of * this.this$0 when unfolding .this's.

Constructor Detail

Inner

public Inner()
Method Detail

getEnclosingInstanceField

public static FieldDecl getEnclosingInstanceField(TypeSig T)
* Return the FieldDecl for a given non-top-level TypeSig's * enclosing instance field (this$0).

* * The resulting field is public, final, and non_null.


getEnclosingInstanceArg

public static FormalParaDecl getEnclosingInstanceArg(ConstructorDecl cd)
* Return the FormalParaDecl for a given inner-class constructor's * enclosing-instance-field argument (this$0arg).

* * The resulting argument is non_null.

* * WARNING: Translate.call depends on the exact name of * this$0arg. If you change this$0arg's name, you must change * Translate.call accordingly.


unfoldThis

static Expr unfoldThis(ThisExpr t)
* Converts a 1.1 ThisExpr of the form .this into an Java * 1.0 expression of the form this.this$0.this$0.this$0...

* * The type of this is taken from GC.thisvar.decl.type.

* * The this$0 fields are the appropriate fields from the * getEnclosingInstanceField(-) routine above.

* * The resulting Expr has already been "prepped", but *not* type * checked.

* * * Exception: If firstThis0 is non-null, then it is used instead * of this.this$0 at the start.


ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage