Class JavaPropertySetter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object coerce​(java.lang.Object target, java.lang.String property, java.lang.Object value, IEolContext context)
      Coerces the given value such that it is permitted for this property.
      boolean conforms​(java.lang.Object target, java.lang.String property, java.lang.Object value, IEolContext context)
      Indicates whether the specified value is permitted for this property.
      protected ObjectMethod getMethodFor​(java.lang.Object object, java.lang.String property, java.lang.Object value, IEolContext context)  
      void invoke​(java.lang.Object target, java.lang.String property, java.lang.Object value, IEolContext context)
      Sets a property on a given object to the specified value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaPropertySetter

        public JavaPropertySetter()
    • Method Detail

      • getMethodFor

        protected ObjectMethod getMethodFor​(java.lang.Object object,
                                            java.lang.String property,
                                            java.lang.Object value,
                                            IEolContext context)
      • invoke

        public void invoke​(java.lang.Object target,
                           java.lang.String property,
                           java.lang.Object value,
                           IEolContext context)
                    throws EolRuntimeException
        Description copied from interface: IPropertySetter
        Sets a property on a given object to the specified value.
        Specified by:
        invoke in interface IPropertySetter
        Parameters:
        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.
        Throws:
        EolRuntimeException - If anything goes wrong in updating the value.
      • coerce

        public java.lang.Object coerce​(java.lang.Object target,
                                       java.lang.String property,
                                       java.lang.Object value,
                                       IEolContext context)
                                throws EolIllegalPropertyException
        Description copied from interface: IReflectivePropertySetter
        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.
        Specified by:
        coerce in interface IReflectivePropertySetter
        Throws:
        EolIllegalPropertyException - when getObject is not a valid model object or when getProperty is not a property that getObject knows about.
      • conforms

        public boolean conforms​(java.lang.Object target,
                                java.lang.String property,
                                java.lang.Object value,
                                IEolContext context)
                         throws EolIllegalPropertyException
        Description copied from interface: IReflectivePropertySetter
        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.
        Specified by:
        conforms in interface IReflectivePropertySetter
        Throws:
        EolIllegalPropertyException - when getObject is not a valid model object or when getProperty is not a property that getObject knows about.