jeops.expressions
Class FieldJavaExpr

java.lang.Object
  |
  +--jeops.expressions.JavaExpr
        |
        +--jeops.expressions.FieldJavaExpr

public class FieldJavaExpr
extends JavaExpr

This class models a field access in (our subset of) the java language.

Version:
0.01 08 Mar 1999
Author:
Carlos Figueira Filho (csff@di.ufpe.br)

Fields inherited from class jeops.expressions.JavaExpr
BOOL, INT, OBJ
 
Constructor Summary
FieldJavaExpr(JavaExpr prevExpr, java.lang.String name)
          Class constructor.
 
Method Summary
 void dump(int spaces)
          Prints the tree for the expression of this precondition.
 java.lang.String fieldName()
          Returns the name of the field represented by this expression.
 java.lang.Class getClasse()
          Returns an object representing the class of this expression.
 JavaExpr getPreviousExpression()
          Returns the expression whose result has the field being accessed.
 java.lang.Class objectType()
          Returns the class of the object whose field is being accessed.
 java.lang.String toString()
          Returns a String representation of this expression.
 
Methods inherited from class jeops.expressions.JavaExpr
dump, evaluateBool, evaluateInt, evaluateObj, identObjetos, numIdentObjetos, tipo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldJavaExpr

public FieldJavaExpr(JavaExpr prevExpr,
                     java.lang.String name)
              throws java.lang.NoSuchFieldException
Class constructor.
Parameters:
prevExpr - the expression which results in the object whose field is being accessed.
name - the field name.
Throws:
java.lang.NoSuchFieldException - if there is no field with the given name.
Method Detail

dump

public void dump(int spaces)
Prints the tree for the expression of this precondition. Useful for debugging.
Overrides:
dump in class JavaExpr
Parameters:
spaces - the identation for the printed output.

fieldName

public java.lang.String fieldName()
Returns the name of the field represented by this expression.

getClasse

public java.lang.Class getClasse()
Returns an object representing the class of this expression.
Overrides:
getClasse in class JavaExpr

getPreviousExpression

public JavaExpr getPreviousExpression()
Returns the expression whose result has the field being accessed.
Returns:
the expression whose result has the field being accessed.

objectType

public java.lang.Class objectType()
Returns the class of the object whose field is being accessed.

toString

public java.lang.String toString()
Returns a String representation of this expression. Useful for debugging.
Overrides:
toString in class java.lang.Object
Returns:
a String representing this expression.