Class JavaValueSetter

  • All Implemented Interfaces:
    ValueSetter

    public class JavaValueSetter
    extends java.lang.Object
    implements ValueSetter
    Implementation, which uses Java-reflection
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaValueSetter​(java.lang.reflect.Field f)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.Object obj)  
      void set​(java.lang.Object obj, java.lang.Object value)  
      void setBoolean​(java.lang.Object obj, boolean value)  
      void setByte​(java.lang.Object obj, byte value)  
      void setChar​(java.lang.Object obj, char value)  
      void setDouble​(java.lang.Object obj, double value)  
      void setFloat​(java.lang.Object obj, float value)  
      void setInt​(java.lang.Object obj, int value)  
      void setLong​(java.lang.Object obj, long value)  
      void setShort​(java.lang.Object obj, short value)  
      • Methods inherited from class java.lang.Object

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

      • JavaValueSetter

        public JavaValueSetter​(java.lang.reflect.Field f)
    • Method Detail

      • setBoolean

        public void setBoolean​(java.lang.Object obj,
                               boolean value)
                        throws java.lang.IllegalAccessException
        Specified by:
        setBoolean in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setChar

        public void setChar​(java.lang.Object obj,
                            char value)
                     throws java.lang.IllegalAccessException
        Specified by:
        setChar in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setByte

        public void setByte​(java.lang.Object obj,
                            byte value)
                     throws java.lang.IllegalAccessException
        Specified by:
        setByte in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setShort

        public void setShort​(java.lang.Object obj,
                             short value)
                      throws java.lang.IllegalAccessException
        Specified by:
        setShort in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setInt

        public void setInt​(java.lang.Object obj,
                           int value)
                    throws java.lang.IllegalAccessException
        Specified by:
        setInt in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setLong

        public void setLong​(java.lang.Object obj,
                            long value)
                     throws java.lang.IllegalAccessException
        Specified by:
        setLong in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setFloat

        public void setFloat​(java.lang.Object obj,
                             float value)
                      throws java.lang.IllegalAccessException
        Specified by:
        setFloat in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • setDouble

        public void setDouble​(java.lang.Object obj,
                              double value)
                       throws java.lang.IllegalAccessException
        Specified by:
        setDouble in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • set

        public void set​(java.lang.Object obj,
                        java.lang.Object value)
                 throws java.lang.IllegalAccessException
        Specified by:
        set in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
      • get

        public java.lang.Object get​(java.lang.Object obj)
                             throws java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException
        Specified by:
        get in interface ValueSetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException