Interface IReflectivePropertySetter
- All Superinterfaces:
IPropertySetter
- All Known Implementing Classes:
EmfPropertySetter
,HtmlPropertySetter
,JavaPropertySetter
,PlainXmlPropertySetter
,SimulinkPropertySetter
,SpreadsheetPropertySetter
,XmlPropertySetter
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
This method is provided only for convenience.coerce
(Object target, String property, Object value, IEolContext context) Coerces the given value such that it is permitted for this property.default Object
This method is provided only for convenience.boolean
conforms
(Object target, String property, Object value, IEolContext context) Indicates whether the specified value is permitted for this property.Methods inherited from interface org.eclipse.epsilon.eol.execute.introspection.IPropertySetter
invoke, invoke, invoke
-
Method Details
-
conforms
boolean conforms(Object target, String property, Object value, IEolContext context) throws EolIllegalPropertyException Indicates whether the specified value is permitted for this property. For example, the value "John Doe" would conform for a string-typed property with lowerbound <= 1 and upperbound >= 1. The precise semantics of conformance differ between types of model.- Throws:
EolIllegalPropertyException
- when getObject is not a valid model object or when getProperty is not a property that getObject knows about.
-
coerce
Object coerce(Object target, String property, Object value, IEolContext context) throws EolIllegalPropertyException Coerces the given value such that it is permitted for this property. For example, in EMF single values can be stored in many-valued features only when they are first stored in a collection.- Throws:
EolIllegalPropertyException
- when getObject is not a valid model object or when getProperty is not a property that getObject knows about.
-
coerce
default Object coerce(Object target, String property, Object value) throws EolIllegalPropertyException This method is provided only for convenience. Implementations should override thecoerce(Object, String, Object, IEolContext)
method instead. Callers should prefer theconforms(Object, String, Object, IEolContext)
where possible.- Parameters:
target
-property
-value
-- Returns:
- Throws:
EolIllegalPropertyException
- Since:
- 1.6
-
conforms
default Object conforms(Object target, String property, Object value) throws EolIllegalPropertyException This method is provided only for convenience. Implementations should override theconforms(Object, String, Object, IEolContext)
method instead. Callers should prefer theconforms(Object, String, Object, IEolContext)
where possible.- Parameters:
target
-property
-value
-- Returns:
- Throws:
EolIllegalPropertyException
- Since:
- 1.6
-