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, propertypublic OwExprReflectiveScope(String name_p)
name_p - the name of this scopeprotected final OwExprProperty prelevateProperty(String propertyName_p) throws OwExprEvaluationException
OwExprExternalScopeOwExprExternalScope.property(String).prelevateProperty in class OwExprExternalScopeOwExprExternalScope.addScope(OwExprExternalScope) or null if no such property was addedOwExprEvaluationExceptionprotected final OwExprFunction prelevateFunction(String functionName_p, OwExprExpressionType[] argumentTypes_p) throws OwExprEvaluationException
OwExprExternalScopeOwExprExternalScope.function(String, OwExprExpressionType[]).prelevateFunction in class OwExprExternalScopenullOwExprEvaluationExceptionpublic OwExprProperty at(int index_p) throws OwExprEvaluationException
at in interface OwExprScopeat in class OwExprExternalScopeindex_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
OwExprScopelength in interface OwExprScopelength in class OwExprExternalScopeOwExprEvaluationExceptionpublic String toString()
toString in class OwExprExternalScopepublic boolean hasProperty(String propertyName_p) throws OwExprEvaluationException
OwExprScopehasProperty in interface OwExprScopehasProperty in class OwExprExternalScopepropertyName_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.