Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ujac.util.exi
Class ConstantOperand  view ConstantOperand download ConstantOperand.java

java.lang.Object
  extended byorg.ujac.util.exi.Operand
      extended byorg.ujac.util.exi.ConstantOperand

public class ConstantOperand
extends Operand

Name: ConstantOperand
Description: A class implementing operands holding constant values.

Log: $Log: ConstantOperand.java,v $
Log: Revision 1.2 2003/11/01 12:06:38 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.1 2003/07/28 22:35:06 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.2 $

Field Summary
private  java.lang.Object object
          The constant object.
 
Fields inherited from class org.ujac.util.exi.Operand
 
Constructor Summary
ConstantOperand()
          Constructs a ConstantOperand instance with specific attributes.
ConstantOperand(char[] source, int position, int length)
          Constructs a ConstantOperand instance with specific attributes.
ConstantOperand(Operand outer)
          Constructs a ConstantOperand instance with specific attributes.
 
Method Summary
 java.lang.Object getObject()
          Returns the constant object.
 java.lang.Object getValue()
          Gets the operand value.
 boolean isSimple()
          Tells whether the operand is a simple one or not.
 void setObject(java.lang.Object object)
          Sets the constant object.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class org.ujac.util.exi.Operand
getCode, getLength, getPosition, getSource, getTotalLength, getTotalPosition, setLength, setPosition, setSource, setTotalLength, setTotalPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

private java.lang.Object object
The constant object.

Constructor Detail

ConstantOperand

public ConstantOperand()
Constructs a ConstantOperand instance with specific attributes.


ConstantOperand

public ConstantOperand(char[] source,
                       int position,
                       int length)
Constructs a ConstantOperand instance with specific attributes.


ConstantOperand

public ConstantOperand(Operand outer)
Constructs a ConstantOperand instance with specific attributes.

Method Detail

isSimple

public boolean isSimple()
Description copied from class: Operand
Tells whether the operand is a simple one or not.

Specified by:
isSimple in class Operand

getObject

public java.lang.Object getObject()
Returns the constant object.


setObject

public void setObject(java.lang.Object object)
Sets the constant object.


getValue

public java.lang.Object getValue()
Gets the operand value.

Specified by:
getValue in class Operand

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).