|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.medor.clone.lib.BasicCloneable
org.objectweb.medor.expression.lib.BasicExpression
org.objectweb.medor.expression.lib.BasicOperand
Field Summary | |
protected double |
doubleValue
|
protected boolean |
isDefined
|
protected long |
longValue
|
protected java.lang.Object |
objectValue
|
Fields inherited from class org.objectweb.medor.expression.lib.BasicExpression |
logger, type |
Constructor Summary | |
|
BasicOperand()
|
|
BasicOperand(BasicOperand bo)
|
|
BasicOperand(boolean p)
|
|
BasicOperand(byte p)
|
|
BasicOperand(byte[] p)
|
|
BasicOperand(char p)
|
|
BasicOperand(char[] p)
|
|
BasicOperand(java.util.Date p)
|
|
BasicOperand(double p)
|
|
BasicOperand(float p)
|
|
BasicOperand(int p)
|
|
BasicOperand(long p)
|
|
BasicOperand(java.lang.Object p,
org.objectweb.jorm.type.api.PType type)
|
protected |
BasicOperand(org.objectweb.jorm.type.api.PType p)
|
|
BasicOperand(short p)
|
|
BasicOperand(java.lang.String p)
|
Method Summary | |
java.lang.Object |
clone(java.lang.Object clone,
java.util.Map obj2clone)
Clone the current object. |
Operand |
compileExpression()
Checks the semantic integrity of an expression. |
Operand |
evaluate(ParameterOperand[] pos,
java.lang.Object o)
It evaluates the expression tree and puts the result into the operand result. |
java.math.BigDecimal |
getBigDecimal()
evalute the expression result and return a BigDecimal value |
java.math.BigInteger |
getBigInteger()
evalute the expression result and return a BigInteger value |
boolean |
getBoolean()
get the operand result as a boolean value |
byte |
getByte()
get the operand result as a byte value |
byte[] |
getByteArray()
get the operand result as a byte[] value |
char |
getChar()
get the operand result as a char value |
char[] |
getCharArray()
get the operand result as a char[] value |
java.util.Date |
getDate()
get the operand result a java.util.Date value |
double |
getDouble()
get the operand result as a double value |
float |
getFloat()
get the operand result as a float value |
int |
getInt()
get the operand result as a byte value |
long |
getLong()
get the operand result as a long value |
java.lang.Object |
getObject()
get the operand result as a java.lang.Object value |
short |
getShort()
get the operand result as a short value |
java.lang.String |
getString()
evalute the expression result and return a string value |
org.objectweb.jorm.type.api.PType |
getType()
It gets the result type of this expression |
java.lang.String |
getValueAsString()
It retrieves the value of the operand as a String. |
boolean |
isDefined()
Indicates if the operand has been defined, ie is the value returned if pertinent |
void |
setIsDefined(boolean isdefined)
|
java.lang.String |
toString()
|
Methods inherited from class org.objectweb.medor.clone.lib.BasicCloneable |
clone, clone, getClone |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected long longValue
protected double doubleValue
protected java.lang.Object objectValue
protected boolean isDefined
Constructor Detail |
public BasicOperand()
public BasicOperand(BasicOperand bo)
protected BasicOperand(org.objectweb.jorm.type.api.PType p)
public BasicOperand(boolean p)
public BasicOperand(char p)
public BasicOperand(char[] p)
public BasicOperand(byte p)
public BasicOperand(byte[] p)
public BasicOperand(short p)
public BasicOperand(int p)
public BasicOperand(long p)
public BasicOperand(float p)
public BasicOperand(double p)
public BasicOperand(java.lang.String p)
public BasicOperand(java.util.Date p)
public BasicOperand(java.lang.Object p, org.objectweb.jorm.type.api.PType type)
Method Detail |
public java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone) throws java.lang.CloneNotSupportedException
org.objectweb.medor.clone.api.Cloneable
clone
in interface org.objectweb.medor.clone.api.Cloneable
clone
in class BasicExpression
java.lang.CloneNotSupportedException
public java.lang.String getValueAsString()
public java.lang.String toString()
public Operand evaluate(ParameterOperand[] pos, java.lang.Object o) throws ExpressionException
Expression
evaluate
in interface Expression
pos
- a list of ParameterOperando
- the input Object from which values are taken for the
evaluation
ExpressionException
public org.objectweb.jorm.type.api.PType getType()
Expression
getType
in interface Expression
getType
in class BasicExpression
public boolean isDefined()
Operand
isDefined
in interface Operand
public void setIsDefined(boolean isdefined)
setIsDefined
in interface Operand
public boolean getBoolean() throws TypingException
Operand
getBoolean
in interface Operand
TypingException
- if it is impossible to return a boolean valuepublic int getInt() throws TypingException
Operand
getInt
in interface Operand
TypingException
- if it is impossible to return an int valuepublic byte getByte() throws TypingException
Operand
getByte
in interface Operand
TypingException
- if it is impossible to return an int valuepublic byte[] getByteArray() throws TypingException
Operand
getByteArray
in interface Operand
TypingException
- if it is impossible to return an int valuepublic short getShort() throws TypingException
Operand
getShort
in interface Operand
TypingException
- if it is impossible to return a short valuepublic long getLong() throws TypingException
Operand
getLong
in interface Operand
TypingException
- if it is impossible to return a long valuepublic float getFloat() throws TypingException
Operand
getFloat
in interface Operand
TypingException
- if it is impossible to return a float value;public double getDouble() throws TypingException
Operand
getDouble
in interface Operand
TypingException
- if it is impossible to return a double valuepublic char getChar() throws TypingException
Operand
getChar
in interface Operand
TypingException
- if it is impossible to return a char value;public char[] getCharArray() throws TypingException
Operand
getCharArray
in interface Operand
TypingException
- if it is impossible to return a char value;public java.lang.String getString() throws TypingException
Operand
getString
in interface Operand
TypingException
- if it is impossible to return a string valuepublic java.math.BigDecimal getBigDecimal() throws TypingException
Operand
getBigDecimal
in interface Operand
TypingException
- if it is impossible to return a string valuepublic java.math.BigInteger getBigInteger() throws TypingException
Operand
getBigInteger
in interface Operand
TypingException
- if it is impossible to return a string valuepublic java.util.Date getDate() throws TypingException
Operand
getDate
in interface Operand
TypingException
- if it is impossible to return java.util.Datepublic java.lang.Object getObject()
Operand
getObject
in interface Operand
public Operand compileExpression()
Expression
compileExpression
in interface Expression
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |