koala.dynamicjava.interpreter.modifier
Class VariableModifier

java.lang.Object
  extended bykoala.dynamicjava.interpreter.modifier.LeftHandSideModifier
      extended bykoala.dynamicjava.interpreter.modifier.VariableModifier
Direct Known Subclasses:
FinalVariableModifier

public class VariableModifier
extends LeftHandSideModifier

This interface represents objets that modify a variable


Field Summary
protected  QualifiedName name
          The name of the variable
protected  java.lang.String representation
          The representation of the variable
protected  java.lang.Class type
          The type of this variable
 
Constructor Summary
VariableModifier(QualifiedName name, java.lang.Class type)
          Creates a new variable modifier
 
Method Summary
 void modify(Context ctx, java.lang.Object value)
          Sets the value of the underlying left hand side expression
 java.lang.Object prepare(Visitor v, Context ctx)
          Prepares the modifier for modification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected QualifiedName name
The name of the variable


type

protected java.lang.Class type
The type of this variable


representation

protected java.lang.String representation
The representation of the variable

Constructor Detail

VariableModifier

public VariableModifier(QualifiedName name,
                        java.lang.Class type)
Creates a new variable modifier

Parameters:
name - the node of that represents this variable
type - the declared type of the variable
Method Detail

prepare

public java.lang.Object prepare(Visitor v,
                                Context ctx)
Prepares the modifier for modification

Specified by:
prepare in class LeftHandSideModifier
Returns:
the value of the left hand side

modify

public void modify(Context ctx,
                   java.lang.Object value)
Sets the value of the underlying left hand side expression

Specified by:
modify in class LeftHandSideModifier


Copyright © 2001 Stephane Hillion. All Rights Reserved.