streamit.frontend.nodes
Class ExprField

java.lang.Object
  extended by streamit.frontend.nodes.FENode
      extended by streamit.frontend.nodes.Expression
          extended by streamit.frontend.nodes.ExprField

public class ExprField
extends Expression

A reference to a named field of a StreamIt structure. This is the expression "foo.bar". It contains a "left" expression and the name of the field being referenced.

Version:
$Id: ExprField.java,v 1.5 2003/10/09 19:50:59 dmaze Exp $
Author:
David Maze <dmaze@cag.lcs.mit.edu>

Constructor Summary
ExprField(FEContext context, Expression left, String name)
          Creates a new field-reference expression, referencing the named field of the specified expression.
 
Method Summary
 Object accept(FEVisitor v)
          Accept a front-end visitor.
 boolean equals(Object other)
           
 Expression getLeft()
          Returns the expression we're taking a field from.
 String getName()
          Returns the name of the field.
 int hashCode()
           
 boolean isLValue()
          Determine if this expression can be assigned to.
 String toString()
           
 
Methods inherited from class streamit.frontend.nodes.FENode
getContext
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExprField

public ExprField(FEContext context,
                 Expression left,
                 String name)
Creates a new field-reference expression, referencing the named field of the specified expression.

Method Detail

getLeft

public Expression getLeft()
Returns the expression we're taking a field from.


getName

public String getName()
Returns the name of the field.


accept

public Object accept(FEVisitor v)
Accept a front-end visitor.

Specified by:
accept in class FENode
Parameters:
v - visitor object
Returns:
the value returned by the method corresponding to this type in the visitor object

isLValue

public boolean isLValue()
Determine if this expression can be assigned to. Fields can always be assigned to.

Overrides:
isLValue in class Expression
Returns:
always true

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object