org.objectweb.medor.filter.jorm.lib

Class SinglePName


public class SinglePName
extends BasicBinaryOperator

A SinglePName is an Operator representing the construction of a PName from a NamingContext and a single Field.

The NamingContext is provided as a ParameterOperand. The name of the ParameterOperand is defined to be:

  1. The fully qualified class name for the PName of the class itself
  2. The fully qualified class name, to which the attribute name is concatenated for a reference PName
The Field is provided as a FieldOperand.

Author:
Alexandre Lefebvre

Constructor Summary

SinglePName(FieldOperand f, Operand pnc, PType nameType)
Constructs a SinglePName from a ParameterOperand representing the naming context, a FieldOperand, and the PType of the corresponding PName.

Method Summary

Operand
compileExpression()
Checks the semantic integrity of an expression.
Operand
evaluate(ParameterOperand[] pos, Object t)
FieldOperand
getField()
String
getOperatorString()
There is no Java operator associated to a PName
ParameterOperand
getPNameManagerParameter()

Constructor Details

SinglePName

public SinglePName(FieldOperand f,
                   Operand pnc,
                   PType nameType)
Constructs a SinglePName from a ParameterOperand representing the naming context, a FieldOperand, and the PType of the corresponding PName.

Parameters:
f - is the FieldOperand from which the value is taken.
pnc - is the Operand representing the naming context.
nameType - is the PType of the PName created by this operator.

Method Details

compileExpression

public Operand compileExpression()
            throws TypingException,
                   MalformedExpressionException
Checks the semantic integrity of an expression. It checks that all types are compatible and prepare the expression to be evaluable. It also creates buffers where stores the result. Notes that when evaluating there is no creation of new objects. This method changes the state of this expression object, it will be evaluable and not modifiable.


evaluate

public Operand evaluate(ParameterOperand[] pos,
                        Object t)
            throws ExpressionException


getField

public FieldOperand getField()


getOperatorString

public String getOperatorString()
There is no Java operator associated to a PName


getPNameManagerParameter

public ParameterOperand getPNameManagerParameter()