uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables
Class Variable

java.lang.Object
  extended by uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.VariableOrConstant
      extended by uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.Variable

public class Variable
extends VariableOrConstant

A variable. During re-write, this will be replaced with a concrete value.

During rewrite, the name property must not be null.

Author:
Matthew Pocock

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.ncl.cs.instantsoap.commandlineprocessor.variables.VariableOrConstant
VariableOrConstant.VariableOrConstantVisitor
 
Constructor Summary
Variable()
          Create a new variable with a null name.
Variable(String name)
          Create a new variable with the given name.
 
Method Summary
 boolean equals(Object o)
           
 String getName()
          Get the name of this variable.
 int hashCode()
           
 void setName(String name)
          Set the name of this variable.
 String toString()
           
 void visit(VariableOrConstant.VariableOrConstantVisitor visitor)
          Visit this object, calling the handle method specific to the concrete-class.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable()
Create a new variable with a null name.


Variable

public Variable(String name)
Create a new variable with the given name.

Parameters:
the - name of this variable
Method Detail

visit

public void visit(VariableOrConstant.VariableOrConstantVisitor visitor)
Description copied from class: VariableOrConstant
Visit this object, calling the handle method specific to the concrete-class.

Specified by:
visit in class VariableOrConstant
Parameters:
visitor - the VariableOrConstantVisitor to process

getName

public String getName()
Get the name of this variable.

Returns:
the name

setName

public void setName(String name)
Set the name of this variable.

Parameters:
name - the name String

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2008. All Rights Reserved.