debugger
Class ClassRipper
java.lang.Object
debugger.ClassRipper
- public class ClassRipper
- extends Object
Copyright (c) Ontos AG (http://www.ontosearch.com).
This class is part of JAPE Debugger component for
GATE (Copyright (c) "The University of Sheffield" see http://gate.ac.uk/)
Contains helper static methods to access private class fields
- Author:
- Andrey Shafirin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getFieldValue
public static Object getFieldValue(Object classInstance,
String fieldName)
throws IllegalAccessException
- Obtains field value from given class instance
regardless either this field private or not
- Parameters:
classInstance
- class instance which value to extractfieldName
- field name
- Returns:
- fileld value
- Throws:
IllegalAccessException
getBoolean
public static boolean getBoolean(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getByte
public static byte getByte(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getChar
public static char getChar(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getInt
public static int getInt(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getFloat
public static float getFloat(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getLong
public static long getLong(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException
getDouble
public static double getDouble(Object classInstance,
String fieldName)
throws IllegalAccessException
- Throws:
IllegalAccessException