Interface IReflectivePropertySetter
-
- All Superinterfaces:
IPropertySetter
- All Known Implementing Classes:
EmfPropertySetter
,HtmlPropertySetter
,JavaPropertySetter
,PlainXmlPropertySetter
,SimulinkPropertySetter
,SpreadsheetPropertySetter
,XmlPropertySetter
public interface IReflectivePropertySetter extends IPropertySetter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Object
coerce(Object target, String property, Object value)
This method is provided only for convenience.Object
coerce(Object target, String property, Object value, IEolContext context)
Coerces the given value such that it is permitted for this property.default Object
conforms(Object target, String property, Object value)
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 Detail
-
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
-
-