Class ReflectionLibrary

Object
ReflectionLibrary

public class ReflectionLibrary
extends Object
The CASIO Enterprise Developer Tools Reflection Library

This Class is used to gain access to fields and methods of other classes where the access modifier (private/protected/(none)/public) prohibits access to that field/method.
Furthermore, using this class methods can be called using the shared "system" user access rights provided by EDT.

NOTE: Use of this API is at your own discretion and risk. You will be fully responsible for the development, functioning, maintenance and service of your Application.
In no event will CASIO or CASIO Europe GmbH be liable for any special damages, including but not limited to costs of procurement of substitute goods or services or any special, indirect, incidental, exemplary, or consequential damages, including but not limited to lost profits, loss of goodwill, business interruption, or loss of information, of any party, including third parties, regardless of whether such party was advised of the possibility of the foregoing.

Since:
1.00
API Note:
The Reflection Library is bound to the calling application on application startup time automatically.
The Library's lifecycle therefore depends on the application lifecycle.
Due to the Lifecycle of Android Applications and the underlying timing, it is strongly advised not to call any Library Methods inside the onCreate method.
When the activity is being launched (and hence the process gets created), the same applies to the onStart and onResume methods.
If you need to call any Library methods at application start in one of the above mentioned methods, you should use the Callback Mechanism offered by the onLibraryReady method instead.
For instance, instead of calling ReflectionLibrary.getBoolean(Object obj, String fieldName) directly in onCreate, use this code to postpone it to a Callback appropriately:
ReflectionLibrary.onLibraryReady(new LibraryCallback() {
     public void onLibraryReady() {
         ReflectionLibrary.getBoolean(this, "booleanFieldName");
     }
 });

Which can be simplified to:
ReflectionLibrary.onLibraryReady(() -> { ReflectionLibrary.getBoolean(this, "booleanFieldName"); });
  • Method Summary

    Modifier and Type Method Description
    static boolean getBoolean​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static boolean getBoolean​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static byte getByte​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static byte getByte​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static char getChar​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static char getChar​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static double getDouble​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static double getDouble​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static float getFloat​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static float getFloat​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static int getInt​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static int getInt​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static long getLong​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static long getLong​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static short getShort​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static short getShort​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static String getString​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static String getString​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static Class<?> getType​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field type will be returned to the caller.
    static Class<?> getType​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field type will be returned to the caller.
    static Object getValue​(Class<?> declaringClass, String fieldName)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be returned to the caller.
    static Object getValue​(Object obj, String fieldName)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be returned to the caller.
    static Object invokeMethod​(Class<?> declaringClass, String methodName)
    Searches for the Static Method specified by "methodName" within the given Class "declaringClass".
    Once found, the method will be called (with no arguments) and the return value will be returned to the caller.
    static Object invokeMethod​(Class<?> declaringClass, String methodName, Class<?>[] classParams, Object[] params)
    Searches for the Static Method specified by "methodName" within the given Class "declaringClass".
    Once found, the method will be called (with given arguments from "params") and the return value will be returned to the caller.
    static Object invokeMethod​(Object obj, String methodName)
    Searches for the Instance Method specified by "methodName" within the given Object "obj" back through it's inheritance chain.
    Once found, the method will be called (with no arguments) and the return value will be returned to the caller.
    static Object invokeMethod​(Object obj, String methodName, Class<?>[] classParams, Object[] params)
    Searches for the Instance Method specified by "methodName" within the given Object "obj" back through it's inheritance chain.
    Once found, the method will be called (with given arguments from "params") and the return value will be returned to the caller.
    static boolean isMethodSupported​(String methodName)
    Check whether the Method indicated by the String methodName parameter is supported on the currently active device
    static boolean isMethodSupported​(BigInteger method)
    Check whether the Method indicated by the BigInteger method parameter is supported on the currently active device
    static void onLibraryReady​(LibraryCallback callback)
    Add a new Callback to the Queue of Callbacks to be processed once the EDT Service becomes available
    static void setBoolean​(Class<?> declaringClass, String fieldName, boolean value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setBoolean​(Object obj, String fieldName, boolean value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setByte​(Class<?> declaringClass, String fieldName, byte value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setByte​(Object obj, String fieldName, byte value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setChar​(Class<?> declaringClass, String fieldName, char value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setChar​(Object obj, String fieldName, char value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setDouble​(Class<?> declaringClass, String fieldName, double value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setDouble​(Object obj, String fieldName, double value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setFloat​(Class<?> declaringClass, String fieldName, float value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setFloat​(Object obj, String fieldName, float value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setInt​(Class<?> declaringClass, String fieldName, int value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setInt​(Object obj, String fieldName, int value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setLong​(Class<?> declaringClass, String fieldName, long value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setLong​(Object obj, String fieldName, long value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setShort​(Class<?> declaringClass, String fieldName, short value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setShort​(Object obj, String fieldName, short value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setString​(Class<?> declaringClass, String fieldName, String value)
    Searches for a static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setString​(Object obj, String fieldName, String value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
    static void setValue​(Class<?> declaringClass, String fieldName, Object value)
    Searches for a Static Field specified by "fieldName" within the class "declaringClass".
    If found, the Field value will be set to the value given by "value".
    static void setValue​(Object obj, String fieldName, Object value)
    Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
    Once found, the Field value will be set to the value given by "value".
  • Method Details

    • isMethodSupported

      public static boolean isMethodSupported​(BigInteger method) throws IllegalStateException
      Check whether the Method indicated by the BigInteger method parameter is supported on the currently active device
      Parameters:
      method - BigInteger: Constant referencing the method to be checked
      Returns:
      boolean: true if the method is supported on the currently active device, otherwise false
      Throws:
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • isMethodSupported

      public static boolean isMethodSupported​(String methodName) throws IllegalStateException
      Check whether the Method indicated by the String methodName parameter is supported on the currently active device
      Parameters:
      methodName - String: Name of the method to be checked
      Returns:
      boolean: true if the method is supported on the currently active device, otherwise false
      Throws:
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getBoolean

      public static boolean getBoolean​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getBoolean

      public static boolean getBoolean​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getByte

      public static byte getByte​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getByte

      public static byte getByte​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getChar

      public static char getChar​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getChar

      public static char getChar​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getDouble

      public static double getDouble​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getDouble

      public static double getDouble​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getFloat

      public static float getFloat​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getFloat

      public static float getFloat​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getInt

      public static int getInt​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getInt

      public static int getInt​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getLong

      public static long getLong​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getLong

      public static long getLong​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getShort

      public static short getShort​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getShort

      public static short getShort​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getString

      public static String getString​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getString

      public static String getString​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • getType

      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field type will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field type
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      ClassNotFoundException - Gets thrown when the given Class does not exist.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getType

      public static Class<?> getType​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException, ClassNotFoundException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field type will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field type
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      ClassNotFoundException - Gets thrown when the given Class does not exist.
    • getValue

      public static Object getValue​(Object obj, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • getValue

      public static Object getValue​(Class<?> declaringClass, String fieldName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      Returns:
      The Field value
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • invokeMethod

      public static Object invokeMethod​(Object obj, String methodName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for the Instance Method specified by "methodName" within the given Object "obj" back through it's inheritance chain.
      Once found, the method will be called (with no arguments) and the return value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Method resides in
      methodName - The name of the Method
      Returns:
      The return value of the Method
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • invokeMethod

      public static Object invokeMethod​(Object obj, String methodName, Class<?>[] classParams, Object[] params) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for the Instance Method specified by "methodName" within the given Object "obj" back through it's inheritance chain.
      Once found, the method will be called (with given arguments from "params") and the return value will be returned to the caller.
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Method resides in
      methodName - The name of the Method
      classParams - Class Types of the arguments for calling the Method, e.g. Actor.class, float.class, int.class
      params - The arguments for calling the Method
      Returns:
      The return value of the Method
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The obj and params parameters are supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj and params parameters at least implement the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj and params parameters as if they would implement the Serializable Interface.
    • invokeMethod

      public static Object invokeMethod​(Class<?> declaringClass, String methodName) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for the Static Method specified by "methodName" within the given Class "declaringClass".
      Once found, the method will be called (with no arguments) and the return value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Method resides in
      methodName - The name of the Method
      Returns:
      The return value of the Method
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
    • invokeMethod

      public static Object invokeMethod​(Class<?> declaringClass, String methodName, Class<?>[] classParams, Object[] params) throws RemoteException, UnsupportedOperationException, IllegalStateException
      Searches for the Static Method specified by "methodName" within the given Class "declaringClass".
      Once found, the method will be called (with given arguments from "params") and the return value will be returned to the caller.
      Parameters:
      declaringClass - The class where the Method resides in
      methodName - The name of the Method
      classParams - Class Types of the arguments for calling the Method, e.g. Actor.class, float.class, int.class
      params - The arguments for calling the Method
      Returns:
      The return value of the Method
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      IllegalStateException - Gets thrown when the Library is not ready yet to accept method calls.
      In such case, please use onLibraryReady Method to add a callback which then processes this method. See API Notes of this class for further details.
      API Note:
      The params parameters are supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the params parameters at least implement the Serializable Interface.
      Should this not be the case either, the method will try to treat the params parameters as if they would implement the Serializable Interface.
    • setBoolean

      public static void setBoolean​(Object obj, String fieldName, boolean value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setBoolean

      public static void setBoolean​(Class<?> declaringClass, String fieldName, boolean value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setByte

      public static void setByte​(Object obj, String fieldName, byte value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setByte

      public static void setByte​(Class<?> declaringClass, String fieldName, byte value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setChar

      public static void setChar​(Object obj, String fieldName, char value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setChar

      public static void setChar​(Class<?> declaringClass, String fieldName, char value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setDouble

      public static void setDouble​(Object obj, String fieldName, double value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setDouble

      public static void setDouble​(Class<?> declaringClass, String fieldName, double value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setFloat

      public static void setFloat​(Object obj, String fieldName, float value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setFloat

      public static void setFloat​(Class<?> declaringClass, String fieldName, float value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setInt

      public static void setInt​(Object obj, String fieldName, int value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setInt

      public static void setInt​(Class<?> declaringClass, String fieldName, int value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setLong

      public static void setLong​(Object obj, String fieldName, long value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setLong

      public static void setLong​(Class<?> declaringClass, String fieldName, long value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setShort

      public static void setShort​(Object obj, String fieldName, short value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setShort

      public static void setShort​(Class<?> declaringClass, String fieldName, short value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setString

      public static void setString​(Object obj, String fieldName, String value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setString

      public static void setString​(Class<?> declaringClass, String fieldName, String value) throws RemoteException, UnsupportedOperationException
      Searches for a static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • setValue

      public static void setValue​(Object obj, String fieldName, Object value) throws RemoteException, UnsupportedOperationException
      Searches for an Instance Field specified by "fieldName" within the given Object "obj" back through it's inheritance chain.
      Once found, the Field value will be set to the value given by "value".
      Parameters:
      obj - The instance Object where (or in which's inherited objects) the regarding Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
      API Note:
      The obj parameter is supposed to implement the Parcelable Interface.
      Should this not be the case, it's recommended that the obj parameter at least implements the Serializable Interface.
      Should this not be the case either, the method will try to treat the obj parameter as if it would implement the Serializable Interface.
    • setValue

      public static void setValue​(Class<?> declaringClass, String fieldName, Object value) throws RemoteException, UnsupportedOperationException
      Searches for a Static Field specified by "fieldName" within the class "declaringClass".
      If found, the Field value will be set to the value given by "value".
      Parameters:
      declaringClass - The class where the Field resides in
      fieldName - The name of the Field
      value - The value to set the Field to
      Throws:
      RemoteException
      UnsupportedOperationException
    • onLibraryReady

      public static void onLibraryReady​(LibraryCallback callback) throws RemoteException, UnsupportedOperationException
      Add a new Callback to the Queue of Callbacks to be processed once the EDT Service becomes available
      Parameters:
      callback - LibraryCallback: Instance of the LibraryCallback Interface which holds the onLibraryReady() Method which will get called once the regarding library becomes available
      Throws:
      RemoteException - Gets thrown when access to the system service fails.
      UnsupportedOperationException - Gets thrown when the current device does not support this method.