Class JavaPropertyGetter
- java.lang.Object
-
- org.eclipse.epsilon.eol.execute.introspection.AbstractPropertyGetter
-
- org.eclipse.epsilon.eol.execute.introspection.java.JavaPropertyGetter
-
- All Implemented Interfaces:
IPropertyGetter
- Direct Known Subclasses:
MuddleModelPropertyGetter
,PatternMatchPropertyGetter
,PlainXmlPropertyGetter
,SimulinkPropertyGetter
,SpreadsheetPropertyGetter
public class JavaPropertyGetter extends AbstractPropertyGetter
-
-
Constructor Summary
Constructors Constructor Description JavaPropertyGetter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectMethod
getMethodFor(java.lang.Object object, java.lang.String property, IEolContext context)
boolean
hasProperty(java.lang.Object object, java.lang.String property, IEolContext context)
Convenience method for checking whether a property exists.java.lang.Object
invoke(java.lang.Object object, java.lang.String property, IEolContext context)
Invokes a property on a model element.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.execute.introspection.IPropertyGetter
hasProperty, invoke
-
-
-
-
Method Detail
-
hasProperty
public boolean hasProperty(java.lang.Object object, java.lang.String property, IEolContext context)
Description copied from interface:IPropertyGetter
Convenience method for checking whether a property exists.- Parameters:
object
- The model element.property
- The property name of the model element.context
- The execution context.- Returns:
true
if the property exists,false
otherwise.
-
getMethodFor
protected ObjectMethod getMethodFor(java.lang.Object object, java.lang.String property, IEolContext context)
-
invoke
public java.lang.Object invoke(java.lang.Object object, java.lang.String property, IEolContext context) throws EolRuntimeException
Description copied from interface:IPropertyGetter
Invokes a property on a model element.- Parameters:
object
- The model element.property
- The property name of the model element.context
- The execution context.- Returns:
- The value of the requested property.
- Throws:
EolIllegalPropertyException
- If the property could not be found.EolRuntimeException
- If an exception occurs when querying the model for the property.
-
-