com.ibm.as400.access.jdbcClient

Class ReflectionUtil

  • java.lang.Object
    • com.ibm.as400.access.jdbcClient.ReflectionUtil


  • public class ReflectionUtil
    extends java.lang.Object
    Author:
    jeber
    • Constructor Summary

      Constructors 
      Constructor and Description
      ReflectionUtil() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void addInterfacesToHashtable(java.util.Hashtable interfacesHashtable, java.lang.Class checkClass) 
      static boolean callMethod_B(java.lang.Object o, java.lang.String methodName)
      call a method which returns a boolean Examples boolean value = callMethod_B(ds, "getReturnExtendedMetaData");
      static boolean callMethod_B(java.lang.Object o, java.lang.String methodName, java.lang.Class x)
      call a method which returns a boolean Examples boolean value = callMethod_B(ds, "isWrapperFor", Class.forName("java.lang.String");
      static boolean callMethod_B(java.lang.Object o, java.lang.String methodName, int i)
      call a method which returns a boolean Examples boolean value = callMethod_B(connection, "isValid", 60)
      static boolean callMethod_B(java.lang.Object o, java.lang.String methodName, java.lang.Object parm1) 
      static int callMethod_I(java.lang.Object o, java.lang.String methodName)
      call a method which returns an integer Examples int value = callMethod_I(ds, "getMaximumPrecision");
      static int callMethod_I(java.lang.Object o, java.lang.String methodName, int parm)
      call a method which returns an integer Examples int value = callMethod_I(ds, "getMaximumPrecision");
      static int callMethod_I(java.lang.Object o, java.lang.String methodName, java.lang.Object parm1) 
      static long callMethod_L(java.lang.Object o, java.lang.String methodName)
      call a method which returns an long Examples int value = callMethod_L(ds, "length");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.Class c)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object p1, java.lang.Object p2)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.Class argType, java.lang.Object p1)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, int i)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, long i, long j)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_O(java.lang.Object o, java.lang.String methodName, java.lang.String s, java.lang.Object parm2)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_OS(java.lang.Object o, java.lang.String methodName, java.lang.String s)
      call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
      static java.lang.Object callMethod_OSA(java.lang.Object o, java.lang.String methodName, java.lang.String s1, java.lang.Object[] o2) 
      static java.lang.Object callMethod_OSS(java.lang.Object o, java.lang.String methodName, java.lang.String s1, java.lang.String s2) 
      static java.lang.Object callMethod_OSSS(java.lang.Object o, java.lang.String methodName, java.lang.String s1, java.lang.String s2, java.lang.String s3) 
      static java.lang.Object callMethod_OSSSS(java.lang.Object o, java.lang.String methodName, java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4) 
      static java.lang.String callMethod_S(java.lang.Object o, java.lang.String methodName)
      call a method which returns a string Examples String property = callMethod_S(ds, "getTranslateHex");
      static java.lang.String callMethod_S(java.lang.Object o, java.lang.String methodName, int i)
      call a method which returns a string Examples String property = callMethod_S(ds, "getTranslateHex");
      static java.lang.String callMethod_S(java.lang.Object o, java.lang.String methodName, long l, int j)
      call a method which returns a string Examples String property = JDReflectionUtil.callMethod_S(outNClob, "getSubString", 1, outLength);
      static void callMethod_V_IS(java.lang.Object o, java.lang.String methodName, java.lang.String parameterName, java.io.InputStream inputStream, long length)
      call a method which returns nothing, but is passed String, InputStream, long Examples JDReflectionUtil.callMethod_V(ps, "setBlob", "col1", is, (long) 4);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName)
      call a method which returns nothing and is passed nothing Examples callMethod_V(ds, "close");
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, boolean parm1)
      call a method which returns nothing, but is passed an boolean Examples callMethod_V(ds, "setReturnExtendedMetaData", true);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, byte[] parm1)
      call a method which returns nothing, but is passed a byte array Examples callMethod_V(ds, "setTranslateHex", "character");
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args)
      call a method which returns nothing.
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, int parm1)
      call a method which returns nothing, but is passed an int Examples callMethod_V(ds, "setMaximumPrecision", 34);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, int parameterIndex, java.io.InputStream inputStream, long length)
      call a method which returns nothing, but is passed int, InputStream, long Examples JDReflectionUtil.callMethod_V(ps, "setBlob", 1, is, (long) 4);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, int i, java.lang.Object parm2)
      call a method which returns nothing, but is passed an integer and object The method to be called is dynamically resolved Examples callMethod_V(ps, "psSetNClob", 1, "character");
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, int parameterIndex, java.io.Reader reader, long length)
      call a method which returns nothing, but is passed int, Reader, long Examples JDReflectionUtil.callMethod_V(ps, "setClob", 1, r, (long) 4);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, int parm1, java.lang.String parm2)
      call a method which returns nothing, but is passed an int and a string String Examples callMethod_V(ps, "setNString", 1, "character");
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, long l, java.lang.Object parm2)
      call a method which returns nothing, but is passed a long and object The method to be called is dynamically resolved Examples callMethod_V(nclob, "setString", 1, "character");
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.Object parm1) 
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.Object parm1, boolean b) 
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.Object parm1, int i) 
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.String parm1, java.lang.Object parm2) 
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.String parameterName, java.io.Reader reader, long length)
      call a method which returns nothing, but is passed String, Reader, long Examples JDReflectionUtil.callMethod_V(ps, "setClob", "C1", r, (long) 4);
      static void callMethod_V(java.lang.Object o, java.lang.String methodName, java.lang.String parm1, java.lang.String parm2)
      call a method which returns nothing, but is passed an string and a string String Examples callMethod_V(ps, "setNString", "col1", "character");
      static int callStaticMethod_I(java.lang.String classname, java.lang.String methodName)
      call a static method whihc returns an int.
      static java.lang.Object callStaticMethod_O(java.lang.String classname, java.lang.String methodName)
      call a static method whihc returns an object.
      static java.lang.Object createObject(java.lang.String classname)
      create an object using reflection Examples JDReflectionUtil.createObject("com.ibm.db2.jcc.DB2XADataSource") callMethod_V(ds, "setTranslateHex", "character");
      static java.lang.Object createObject(java.lang.String classname, byte[] arg)
      create an object using reflection Examples JDReflectionUtil.createObject("com.ibm.db2.app.DB2RowId", testArray)
      static java.lang.Object createObject(java.lang.String classname, java.lang.String parameterClass, java.lang.Object arg)
      create an object using reflection Examples JDReflectionUtil.createObject("javax.xml.transform.stax.StAXSource", "javax.xml.stream.XMLStreamReader", xmlStreamReader);
      static int getField_I(java.lang.Object o, java.lang.String fieldName)
      get an integer field Examples int value = getField_I(ds, "getMaximumPrecision");
      static void handleIte(java.lang.reflect.InvocationTargetException ite) 
      • Methods inherited from class java.lang.Object

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

      • ReflectionUtil

        public ReflectionUtil()
    • Method Detail

      • handleIte

        public static void handleIte(java.lang.reflect.InvocationTargetException ite)
                              throws java.lang.Exception
        Parameters:
        ite -
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.Class argType,
                                    java.lang.Object p1)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o - object in which to call the method
        methodName - method to call
        argType - type of the parameter
        p1 - parameter
        Returns:
        object that is a result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.Class[] argTypes,
                                    java.lang.Object p1,
                                    java.lang.Object p2)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        argTypes -
        p1 -
        p2 -
        Returns:
        object that is a result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.Class[] argTypes,
                                    java.lang.Object p1,
                                    java.lang.Object p2,
                                    java.lang.Object p3)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        argTypes -
        p1 -
        p2 -
        p3 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.Class[] argTypes,
                                    java.lang.Object p1,
                                    java.lang.Object p2,
                                    java.lang.Object p3,
                                    java.lang.Object p4)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        argTypes -
        p1 -
        p2 -
        p3 -
        p4 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    int i)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        i -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.Class c)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        c -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_OS

        public static java.lang.Object callMethod_OS(java.lang.Object o,
                                     java.lang.String methodName,
                                     java.lang.String s)
                                              throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        s -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_OSS

        public static java.lang.Object callMethod_OSS(java.lang.Object o,
                                      java.lang.String methodName,
                                      java.lang.String s1,
                                      java.lang.String s2)
                                               throws java.lang.Exception
        Parameters:
        o -
        methodName -
        s1 -
        s2 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_OSA

        public static java.lang.Object callMethod_OSA(java.lang.Object o,
                                      java.lang.String methodName,
                                      java.lang.String s1,
                                      java.lang.Object[] o2)
                                               throws java.lang.Exception
        Parameters:
        o -
        methodName -
        s1 -
        o2 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_OSSS

        public static java.lang.Object callMethod_OSSS(java.lang.Object o,
                                       java.lang.String methodName,
                                       java.lang.String s1,
                                       java.lang.String s2,
                                       java.lang.String s3)
                                                throws java.lang.Exception
        Parameters:
        o -
        methodName -
        s1 -
        s2 -
        s3 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_OSSSS

        public static java.lang.Object callMethod_OSSSS(java.lang.Object o,
                                        java.lang.String methodName,
                                        java.lang.String s1,
                                        java.lang.String s2,
                                        java.lang.String s3,
                                        java.lang.String s4)
                                                 throws java.lang.Exception
        Parameters:
        o -
        methodName -
        s1 -
        s2 -
        s3 -
        s4 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    java.lang.String s,
                                    java.lang.Object parm2)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        s -
        parm2 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_O

        public static java.lang.Object callMethod_O(java.lang.Object o,
                                    java.lang.String methodName,
                                    long i,
                                    long j)
                                             throws java.lang.Exception
        call a method which returns an Object Examples Object o = callMethod_O(ds, ... ");
        Parameters:
        o -
        methodName -
        i -
        j -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_S

        public static java.lang.String callMethod_S(java.lang.Object o,
                                    java.lang.String methodName)
                                             throws java.lang.Exception
        call a method which returns a string Examples String property = callMethod_S(ds, "getTranslateHex");
        Parameters:
        o -
        methodName -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_S

        public static java.lang.String callMethod_S(java.lang.Object o,
                                    java.lang.String methodName,
                                    int i)
                                             throws java.lang.Exception
        call a method which returns a string Examples String property = callMethod_S(ds, "getTranslateHex");
        Parameters:
        o -
        methodName -
        i -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_S

        public static java.lang.String callMethod_S(java.lang.Object o,
                                    java.lang.String methodName,
                                    long l,
                                    int j)
                                             throws java.lang.Exception
        call a method which returns a string Examples String property = JDReflectionUtil.callMethod_S(outNClob, "getSubString", 1, outLength);
        Parameters:
        o -
        methodName -
        l -
        j -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_I

        public static int callMethod_I(java.lang.Object o,
                       java.lang.String methodName)
                                throws java.lang.Exception
        call a method which returns an integer Examples int value = callMethod_I(ds, "getMaximumPrecision");
        Parameters:
        o -
        methodName -
        Returns:
        integer that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_I

        public static int callMethod_I(java.lang.Object o,
                       java.lang.String methodName,
                       int parm)
                                throws java.lang.Exception
        call a method which returns an integer Examples int value = callMethod_I(ds, "getMaximumPrecision");
        Parameters:
        o -
        methodName -
        parm -
        Returns:
        integer that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_I

        public static int callMethod_I(java.lang.Object o,
                       java.lang.String methodName,
                       java.lang.Object parm1)
                                throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_L

        public static long callMethod_L(java.lang.Object o,
                        java.lang.String methodName)
                                 throws java.lang.Exception
        call a method which returns an long Examples int value = callMethod_L(ds, "length");
        Parameters:
        o -
        methodName -
        Returns:
        long that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_B

        public static boolean callMethod_B(java.lang.Object o,
                           java.lang.String methodName)
                                    throws java.lang.Exception
        call a method which returns a boolean Examples boolean value = callMethod_B(ds, "getReturnExtendedMetaData");
        Parameters:
        o -
        methodName -
        Returns:
        boolean that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_B

        public static boolean callMethod_B(java.lang.Object o,
                           java.lang.String methodName,
                           int i)
                                    throws java.lang.Exception
        call a method which returns a boolean Examples boolean value = callMethod_B(connection, "isValid", 60)
        Parameters:
        o -
        methodName -
        i -
        Returns:
        boolean that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_B

        public static boolean callMethod_B(java.lang.Object o,
                           java.lang.String methodName,
                           java.lang.Class x)
                                    throws java.lang.Exception
        call a method which returns a boolean Examples boolean value = callMethod_B(ds, "isWrapperFor", Class.forName("java.lang.String");
        Parameters:
        o -
        methodName -
        x -
        Returns:
        boolean that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_B

        public static boolean callMethod_B(java.lang.Object o,
                           java.lang.String methodName,
                           java.lang.Object parm1)
                                    throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        Returns:
        boolean that is the result of the method call
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.Class[] argTypes,
                        java.lang.Object[] args)
                                 throws java.lang.Exception
        call a method which returns nothing. The parameter types and values are passed. Examples callMethod_V(ds, "setReturnExtendedMetaData", argTypes, args);
        Parameters:
        o -
        methodName -
        argTypes -
        args -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName)
                                 throws java.lang.Exception
        call a method which returns nothing and is passed nothing Examples callMethod_V(ds, "close");
        Parameters:
        o -
        methodName -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        int parm1)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed an int Examples callMethod_V(ds, "setMaximumPrecision", 34);
        Parameters:
        o -
        methodName -
        parm1 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        int parm1,
                        java.lang.String parm2)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed an int and a string String Examples callMethod_V(ps, "setNString", 1, "character");
        Parameters:
        o -
        methodName -
        parm1 -
        parm2 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.String parm1,
                        java.lang.String parm2)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed an string and a string String Examples callMethod_V(ps, "setNString", "col1", "character");
        Parameters:
        o -
        methodName -
        parm1 -
        parm2 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        boolean parm1)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed an boolean Examples callMethod_V(ds, "setReturnExtendedMetaData", true);
        Parameters:
        o -
        methodName -
        parm1 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        byte[] parm1)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed a byte array Examples callMethod_V(ds, "setTranslateHex", "character");
        Parameters:
        o -
        methodName -
        parm1 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        int i,
                        java.lang.Object parm2)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed an integer and object The method to be called is dynamically resolved Examples callMethod_V(ps, "psSetNClob", 1, "character");
        Parameters:
        o -
        methodName -
        i -
        parm2 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.Object parm1,
                        int i)
                                 throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        i -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.Object parm1,
                        boolean b)
                                 throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        b -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.Object parm1)
                                 throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        Throws:
        java.lang.Exception
      • addInterfacesToHashtable

        public static void addInterfacesToHashtable(java.util.Hashtable interfacesHashtable,
                                    java.lang.Class checkClass)
        Parameters:
        interfacesHashtable -
        checkClass -
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.String parm1,
                        java.lang.Object parm2)
                                 throws java.lang.Exception
        Parameters:
        o -
        methodName -
        parm1 -
        parm2 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        long l,
                        java.lang.Object parm2)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed a long and object The method to be called is dynamically resolved Examples callMethod_V(nclob, "setString", 1, "character");
        Parameters:
        o -
        methodName -
        l -
        parm2 -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        int parameterIndex,
                        java.io.InputStream inputStream,
                        long length)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed int, InputStream, long Examples JDReflectionUtil.callMethod_V(ps, "setBlob", 1, is, (long) 4);
        Parameters:
        o -
        methodName -
        parameterIndex -
        inputStream -
        length -
        Throws:
        java.lang.Exception
      • callMethod_V_IS

        public static void callMethod_V_IS(java.lang.Object o,
                           java.lang.String methodName,
                           java.lang.String parameterName,
                           java.io.InputStream inputStream,
                           long length)
                                    throws java.lang.Exception
        call a method which returns nothing, but is passed String, InputStream, long Examples JDReflectionUtil.callMethod_V(ps, "setBlob", "col1", is, (long) 4);
        Parameters:
        o -
        methodName -
        parameterName -
        inputStream -
        length -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        int parameterIndex,
                        java.io.Reader reader,
                        long length)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed int, Reader, long Examples JDReflectionUtil.callMethod_V(ps, "setClob", 1, r, (long) 4);
        Parameters:
        o -
        methodName -
        parameterIndex -
        reader -
        length -
        Throws:
        java.lang.Exception
      • callMethod_V

        public static void callMethod_V(java.lang.Object o,
                        java.lang.String methodName,
                        java.lang.String parameterName,
                        java.io.Reader reader,
                        long length)
                                 throws java.lang.Exception
        call a method which returns nothing, but is passed String, Reader, long Examples JDReflectionUtil.callMethod_V(ps, "setClob", "C1", r, (long) 4);
        Parameters:
        o -
        methodName -
        parameterName -
        reader -
        length -
        Throws:
        java.lang.Exception
      • callStaticMethod_O

        public static java.lang.Object callStaticMethod_O(java.lang.String classname,
                                          java.lang.String methodName)
                                                   throws java.lang.Exception
        call a static method whihc returns an object. Examples JDReflectionUtil.callStaticMethod_O("", "newInstance");
        Parameters:
        classname -
        methodName -
        Returns:
        object that is the result of the method call
        Throws:
        java.lang.Exception
      • callStaticMethod_I

        public static int callStaticMethod_I(java.lang.String classname,
                             java.lang.String methodName)
                                      throws java.lang.Exception
        call a static method whihc returns an int. Examples JDReflectionUtil.callStaticMethod_O("", "newInstance");
        Parameters:
        classname -
        methodName -
        Returns:
        integer that is the result of the method call
        Throws:
        java.lang.Exception
      • createObject

        public static java.lang.Object createObject(java.lang.String classname)
                                             throws java.lang.Exception
        create an object using reflection Examples JDReflectionUtil.createObject("com.ibm.db2.jcc.DB2XADataSource") callMethod_V(ds, "setTranslateHex", "character");
        Parameters:
        classname -
        Returns:
        created object
        Throws:
        java.lang.Exception
      • createObject

        public static java.lang.Object createObject(java.lang.String classname,
                                    byte[] arg)
                                             throws java.lang.Exception
        create an object using reflection Examples JDReflectionUtil.createObject("com.ibm.db2.app.DB2RowId", testArray)
        Parameters:
        classname -
        arg -
        Returns:
        created object
        Throws:
        java.lang.Exception
      • createObject

        public static java.lang.Object createObject(java.lang.String classname,
                                    java.lang.String parameterClass,
                                    java.lang.Object arg)
                                             throws java.lang.Exception
        create an object using reflection Examples JDReflectionUtil.createObject("javax.xml.transform.stax.StAXSource", "javax.xml.stream.XMLStreamReader", xmlStreamReader);
        Parameters:
        classname -
        parameterClass -
        arg -
        Returns:
        created object
        Throws:
        java.lang.Exception
      • getField_I

        public static int getField_I(java.lang.Object o,
                     java.lang.String fieldName)
                              throws java.lang.Exception
        get an integer field Examples int value = getField_I(ds, "getMaximumPrecision");
        Parameters:
        o -
        fieldName -
        Returns:
        integer value of field
        Throws:
        java.lang.Exception