public class OwExprReflectiveScope extends OwExprExternalScope
Reflective scopes are external scopes that rely on POJOs to prelevate
functions and properties.
Getters of the underlying POJO will be interpreted as properties and methods will be
interpreted as functions.
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 and Description |
---|
OwExprReflectiveScope(String name_p)
Constructor
|
OwExprReflectiveScope(String name_p,
Object javaObject_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
OwExprProperty |
at(int index_p)
Indexed scope access method form an array POJO.
|
boolean |
hasProperty(String propertyName_p)
Property access helper method.
|
int |
length()
Indexed scope access helper method
|
protected OwExprFunction |
prelevateFunction(String functionName_p,
OwExprExpressionType[] argumentTypes_p)
Function search hook for
OwExprExternalScope.function(String, OwExprExpressionType[]) .Children of this class should override this method to perform custom |
protected OwExprProperty |
prelevateProperty(String propertyName_p)
Property search hook for
OwExprExternalScope.property(String) . |
String |
toString() |
addScope, function, getName, property
public OwExprReflectiveScope(String name_p)
name_p
- the name of this scopeprotected final OwExprProperty prelevateProperty(String propertyName_p) throws OwExprEvaluationException
OwExprExternalScope
OwExprExternalScope.property(String)
.prelevateProperty
in class OwExprExternalScope
OwExprExternalScope.addScope(OwExprExternalScope)
or null
if no such property was addedOwExprEvaluationException
protected final OwExprFunction prelevateFunction(String functionName_p, OwExprExpressionType[] argumentTypes_p) throws OwExprEvaluationException
OwExprExternalScope
OwExprExternalScope.function(String, OwExprExpressionType[])
.prelevateFunction
in class OwExprExternalScope
null
OwExprEvaluationException
public OwExprProperty at(int index_p) throws OwExprEvaluationException
at
in interface OwExprScope
at
in class OwExprExternalScope
index_p
- int
index of the requested propertyOwExprProperty
property found at the requested indexOwExprEvaluationException
- if the requested indexed access has failed (index out of bounds,
the creation of OwExprProperty
has failed)public int length() throws OwExprEvaluationException
OwExprScope
length
in interface OwExprScope
length
in class OwExprExternalScope
OwExprEvaluationException
public String toString()
toString
in class OwExprExternalScope
public boolean hasProperty(String propertyName_p) throws OwExprEvaluationException
OwExprScope
hasProperty
in interface OwExprScope
hasProperty
in class OwExprExternalScope
propertyName_p
- the name of the requested propertytrue
if this scope can perform property access for the requested property
- an access via OwExprScope.property(String)
will NOT fail on missing property grounds,
false
otherwiseOwExprEvaluationException
- if the property validity check has failedCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.