Class JavaValueGetterMethod

  • All Implemented Interfaces:
    ValueGetter

    public class JavaValueGetterMethod
    extends java.lang.Object
    implements ValueGetter
    Implementation, which uses Java-reflection
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.Object obj)  
      boolean getBoolean​(java.lang.Object obj)  
      byte getByte​(java.lang.Object obj)  
      char getChar​(java.lang.Object obj)  
      double getDouble​(java.lang.Object obj)  
      float getFloat​(java.lang.Object obj)  
      java.lang.String getGetterName()  
      int getInt​(java.lang.Object obj)  
      long getLong​(java.lang.Object obj)  
      short getShort​(java.lang.Object obj)  
      boolean hasHaser()  
      boolean hasValue​(java.lang.Object obj)  
      • Methods inherited from class java.lang.Object

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

      • JavaValueGetterMethod

        public JavaValueGetterMethod​(FieldLayout layout)
    • Method Detail

      • hasHaser

        public boolean hasHaser()
      • hasValue

        public boolean hasValue​(java.lang.Object obj)
                         throws java.lang.IllegalAccessException,
                                java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getGetterName

        public java.lang.String getGetterName()
      • getBoolean

        public boolean getBoolean​(java.lang.Object obj)
                           throws java.lang.IllegalAccessException,
                                  java.lang.reflect.InvocationTargetException
        Specified by:
        getBoolean in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getChar

        public char getChar​(java.lang.Object obj)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
        Specified by:
        getChar in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getByte

        public byte getByte​(java.lang.Object obj)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
        Specified by:
        getByte in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getShort

        public short getShort​(java.lang.Object obj)
                       throws java.lang.IllegalAccessException,
                              java.lang.reflect.InvocationTargetException
        Specified by:
        getShort in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getInt

        public int getInt​(java.lang.Object obj)
                   throws java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
        Specified by:
        getInt in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getLong

        public long getLong​(java.lang.Object obj)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
        Specified by:
        getLong in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getFloat

        public float getFloat​(java.lang.Object obj)
                       throws java.lang.IllegalAccessException,
                              java.lang.reflect.InvocationTargetException
        Specified by:
        getFloat in interface ValueGetter
        Throws:
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getDouble

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

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