|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.expression.language.OwExprValue
public abstract class OwExprValue
A value is an expression evaluation result.
All values are scopes.
Values are ''visitable'' by binary operator objects (see Visitor pattern) in a 2
stage visitor pattern implementation (first left side operand is visited than
right side operand is visited thus selecting a typed operation evaluation in the operator class)
Values are ''visitable'' by binary operator objects (see Visitor pattern) in a 1 stage
visitor implementation.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor Summary | |
---|---|
OwExprValue(Class javaType_p)
|
Method Summary | |
---|---|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprBooleanValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprDateValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprNumericValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprScopeValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprStringValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprTimeValue v1_p)
Stage 2 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprValue v2_p)
Stage 1 binary operator visitor acceptance method |
OwExprValue |
accept(OwExprUnaryOperator unaryOperator_p)
Unary operator visitor acceptance method |
OwExprProperty |
at(int index_p)
Indexed scope access method |
static OwExprValue |
fromJavaValue(Object javaValue_p)
Static expression language value factory based on a java object. |
static OwExprValue |
fromJavaValue(Object javaValue_p,
Class<?> javaType_p)
Static expression language value factory based on a java object. |
OwExprFunction |
function(String functionName_p,
OwExprExpressionType[] argunmentTypes_p)
Scope OwExprScope.function(String, OwExprExpressionType[]) default implementation. |
Class<?> |
getJavaType()
|
protected Map |
getValuePropeties()
Overridable default value properties factory method |
boolean |
hasProperty(String propertyName_p)
Scope OwExprScope.hasProperty(String) default implementation. |
int |
length()
Scope OwExprScope.length() helper default value implementation (returns 0). |
OwExprProperty |
property(String propertyName_p)
Scope OwExprScope.property(String) default implementation. |
abstract Object |
toJavaObject(Class javaSuperType_p)
Java class conversion method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OwExprValue(Class javaType_p)
javaType_p
- original java typeMethod Detail |
---|
public static final OwExprValue fromJavaValue(Object javaValue_p) throws OwExprEvaluationException
Expression Type | Java Peer Type |
OwExprNumericValue | java.lang.Number |
OwExprStringValue | java.lang.String |
OwExprBooleanValue | java.lang.Boolean |
OwExprTimeValue | OwExprTime |
OwExprDateValue | java.util.Calendar |
OwExprNullValue | Java's null literal type |
OwExprScopeValue
will
be factored.
javaValue_p
- an object to be converted into its expression language value peer
OwExprEvaluationException
public static final OwExprValue fromJavaValue(Object javaValue_p, Class<?> javaType_p) throws OwExprEvaluationException
Expression Type | Java Peer Type |
OwExprNumericValue | java.lang.Number |
OwExprStringValue | java.lang.String |
OwExprBooleanValue | java.lang.Boolean |
OwExprTimeValue | OwExprTime |
OwExprDateValue | java.util.Calendar |
OwExprNullValue | Java's null literal type |
OwExprScopeValue
will
be factored.
javaValue_p
- an object to be converted into its expression language value peerjavaType_p
- original java type
OwExprEvaluationException
public abstract Object toJavaObject(Class javaSuperType_p) throws OwExprEvaluationException
javaSuperType_p
- the requested java super type
The returned type should be a subclass of this type.
This is necessary for values having more than one possible java peers
such as OwExprNumericValue
's Integer and Double support.
OwExprEvaluationException
public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprValue v2_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv2_p
- right side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprBooleanValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprNumericValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprStringValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprDateValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprTimeValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprScopeValue v1_p) throws OwExprEvaluationException
binaryOperator_p
- binary operator visitorv1_p
- lef side operator value
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprUnaryOperator unaryOperator_p) throws OwExprEvaluationException
unaryOperator_p
- binary operator visitor
OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprFunction function(String functionName_p, OwExprExpressionType[] argunmentTypes_p) throws OwExprEvaluationException
OwExprScope.function(String, OwExprExpressionType[])
default implementation.
By default value-scopes have no functions defined
function
in interface OwExprScope
functionName_p
- the requested function nameargunmentTypes_p
- array of OwExprExpressionType
that defines the argument signature
of the requested function
OwExprProperty
designated by propertyName_p and found in this value's scope
OwExprEvaluationException
- if the requested property is not found in this scope or
the creation of the corresponding OwExprProperty
has failedpublic OwExprProperty at(int index_p) throws OwExprEvaluationException
at
in interface OwExprScope
index_p
- int
index of the requested property
OwExprEvaluationException
- always as no indexed access is supported on value scopespublic int length() throws OwExprEvaluationException
OwExprScope.length()
helper default value implementation (returns 0).
length
in interface OwExprScope
OwExprEvaluationException
protected Map getValuePropeties()
Map
of OwExprProperty
for this valuepublic OwExprProperty property(String propertyName_p) throws OwExprEvaluationException
OwExprScope.property(String)
default implementation.
A default value properties mechanism is implemented.
Concrete values must create properties via getValuePropeties()
.
property
in interface OwExprScope
propertyName_p
- the requested property name
OwExprProperty
designated by propertyName_p and found in this value's scope
OwExprEvaluationException
- if the requested property is not found in this scope or
the creation of the corresponding OwExprProperty
has failedpublic boolean hasProperty(String propertyName_p) throws OwExprEvaluationException
OwExprScope.hasProperty(String)
default implementation.
A default value properties mechanism is implemented.
Concrete values must create properties via getValuePropeties()
.
hasProperty
in interface OwExprScope
propertyName_p
- the requested property name
true
if this scope can perform property access for the requested property
- an access via property(String)
will NOT fail on missing property grounds,
false
otherwise
OwExprEvaluationException
- if the property validity check has failedpublic final Class<?> getJavaType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |