|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.medor.filter.jorm.lib.CompositePName
A CompositePName is an Operator representing the construction of a PName from a NamingContext and several Fields.
The NamingContext is provided as a ParameterOperand. The name of the ParameterOperand is defined to be:
Field Summary | |
protected java.lang.String[] |
cofns
|
protected FieldOperand[] |
fields
|
protected TuplePNameGetter |
myGetter
|
protected Operand |
nc
|
protected VariableOperand |
result
|
protected PType |
type
|
protected boolean |
verified
|
Fields inherited from interface org.objectweb.medor.filter.api.Operator |
ABS, AND, AVG, BITWIZE, CONCAT, CONDAND, CONDOR, COUNT, DIV, EQUAL, FIRSTLOCATE, GREATER, GREATEREQUAL, IN, INDEXEDLOCATE, LENGTH, LOWER, LOWEREQUAL, MAX, MEMBEROF, MIN, MINUS, MOD, MULT, NAV, NOT, NOTEQUAL, NOTMEMBEROF, OR, PLUS, SQRT, SUBSTRING, SUM, UMINUS |
Constructor Summary | |
CompositePName(FieldOperand[] fs,
java.lang.String[] compositefieldnames,
Operand po,
PType t)
Constructs a SinglePName from a ParameterOperand representing the naming context, and an array of FieldOperand. |
Method Summary | |
java.lang.Object |
clone()
|
void |
compileExpression()
Checks the semantic integrity of an expression. |
void |
evaluate(ParameterOperand[] pos,
Tuple t)
It evaluates the expression tree and puts the result into the operand result. |
java.lang.String[] |
getCompositeFieldName()
It retrieves an array of the composite field name. |
Expression |
getExpression(int idx)
|
FieldOperand[] |
getFields()
|
int |
getOperandNumber()
|
java.lang.String |
getOperatorString()
There is no Java operator associated to a PName |
ParameterOperand |
getPNameManagerParameter()
|
Operand |
getResult()
Gets the operand in wich the result will be put in |
PType |
getType()
It gets the result type of this expression |
boolean |
isCompiled()
CHecks wether this expression is compiled or not |
void |
setExpression(int idx,
Expression exp)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PType type
protected FieldOperand[] fields
protected java.lang.String[] cofns
protected Operand nc
protected VariableOperand result
protected boolean verified
protected TuplePNameGetter myGetter
Constructor Detail |
public CompositePName(FieldOperand[] fs, java.lang.String[] compositefieldnames, Operand po, PType t) throws MedorException
fs
- is the array of FieldOperands from which the value is taken.po
- is the ParameterOperand representing the naming context.t
- is the PType of the PName created by this operator.compositefieldnames
- is the compositename fields. This array
is linked to parameter fs (FieldOperand[]).
MedorException
- when the number of FieldOperand is not equal to
the size of the proj parameter.Method Detail |
public java.lang.String[] getCompositeFieldName()
public ParameterOperand getPNameManagerParameter()
public int getOperandNumber()
getOperandNumber
in interface Operator
public Expression getExpression(int idx) throws java.lang.ArrayIndexOutOfBoundsException
getExpression
in interface Operator
java.lang.ArrayIndexOutOfBoundsException
public void setExpression(int idx, Expression exp) throws java.lang.ArrayIndexOutOfBoundsException
setExpression
in interface Operator
java.lang.ArrayIndexOutOfBoundsException
public PType getType()
Expression
getType
in interface Expression
public boolean isCompiled()
isCompiled
in interface Expression
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public Operand getResult() throws java.lang.IllegalStateException
getResult
in interface Expression
java.lang.IllegalStateException
- if this expression is not
compiled.public void evaluate(ParameterOperand[] pos, Tuple t) throws MedorException
Expression
evaluate
in interface Expression
pos
- a list of ParameterOperandt
- Tuple
MedorException
- if evaluation errorpublic void compileExpression() throws TypingException, MalformedExpressionException
compileExpression
in interface Expression
TypingException
- when incompatible types error
occurs.
MalformedExpressionException
- if syntax errorpublic FieldOperand[] getFields()
public java.lang.String getOperatorString()
getOperatorString
in interface Operator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |