public class EmfPropertySetter extends AbstractPropertySetter implements IReflectivePropertySetter
Constructor and Description |
---|
EmfPropertySetter() |
Modifier and Type | Method and Description |
---|---|
Object |
coerce(Object target,
String property,
Object value,
IEolContext context)
Coerces the given value such that it is permitted for this property.
|
boolean |
conforms(Object target,
String property,
Object value,
IEolContext context)
Indicates whether the specified value is permitted for this property.
|
protected void |
copyCollectionValues(Collection<?> source,
Collection<Object> target) |
protected org.eclipse.emf.ecore.EObject |
getEObject(Object object,
String property,
Object value,
IEolContext context) |
void |
invoke(Object target,
String property,
Object value,
IEolContext context)
Sets a property on a given object to the specified value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
coerce, conforms
invoke
public Object coerce(Object target, String property, Object value, IEolContext context) throws EolIllegalPropertyException
IReflectivePropertySetter
coerce
in interface IReflectivePropertySetter
EolIllegalPropertyException
- when getObject is not a valid
model object or when getProperty is not a property that
getObject knows about.public boolean conforms(Object target, String property, Object value, IEolContext context) throws EolIllegalPropertyException
IReflectivePropertySetter
conforms
in interface IReflectivePropertySetter
EolIllegalPropertyException
- when getObject is not a valid
model object or when getProperty is not a property that
getObject knows about.public void invoke(Object target, String property, Object value, IEolContext context) throws EolRuntimeException
IPropertySetter
invoke
in interface IPropertySetter
target
- The model element to update.property
- The name of the property of the model element.value
- The new value of the property.context
- The execution context.EolRuntimeException
- If anything goes wrong in updating the value.protected void copyCollectionValues(Collection<?> source, Collection<Object> target)
protected org.eclipse.emf.ecore.EObject getEObject(Object object, String property, Object value, IEolContext context) throws EolIllegalPropertyException
EolIllegalPropertyException
Copyright © 2020. All rights reserved.