Package io.github.toolfactory.narcissus
Class Narcissus
java.lang.Object
io.github.toolfactory.narcissus.Narcissus
Narcissus reflection library.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
private static interface
Iterator applied to each method of a class and its superclasses/interfaces. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private static Narcissus.Getter
<Constructor<?>[]> private static Narcissus.Getter
<Field[]> private static Narcissus.Getter
<Method[]> static final boolean
Whether or not the library was successfully loaded. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
allocateInstance
(Class<?> cls) Allocate an object instance, without calling any constructor.enumerateFields
(Class<?> cls) Enumerate all fields in the given class, ignoring visibility and bypassing security checks.enumerateMethods
(Class<?> cls) Enumerate all methods in the given class, ignoring visibility and bypassing security checks.static Class
<?> Finds a class by name (e.g.private static Class
<?> findClassInternal
(String classNameInternal) static Constructor
<?> findConstructor
(Class<?> cls, Class<?>... paramTypes) Find a constructor by parameter types in the given class, ignoring visibility and bypassing security checks.static Field
Find a field by name in the given class, ignoring visibility and bypassing security checks.private static Field
findFieldInternal
(Class<?> cls, String fieldName, String sig, boolean isStatic) static Method
findMethod
(Class<?> cls, String methodName, Class<?>... paramTypes) Find a method by name and parameter types in the given class, ignoring visibility and bypassing security checks.private static Method
findMethodInternal
(Class<?> cls, String methodName, String sig, boolean isStatic) private static void
forAllMethods
(Class<?> cls, Narcissus.MethodIterator methodIter) Iterate through all methods in the given class, ignoring visibility and bypassing security checks.static boolean
getBooleanField
(Object object, Field field) Get the value of a boolean field, ignoring visibility and bypassing security checks.static byte
getByteField
(Object object, Field field) Get the value of a byte field, ignoring visibility and bypassing security checks.static char
getCharField
(Object object, Field field) Get the value of a char field, ignoring visibility and bypassing security checks.static <T> Constructor<T>[]
getDeclaredConstructors
(Class<T> cls) Get declared constructors, ignoring visibility and bypassing security checks.static Field[]
getDeclaredFields
(Class<?> cls) Get declared fields, ignoring visibility and bypassing security checks.static Method[]
getDeclaredMethods
(Class<?> cls) Get declared methods, ignoring visibility and bypassing security checks.static double
getDoubleField
(Object object, Field field) Get the value of a double field, ignoring visibility and bypassing security checks.static Object
Get the value of an object field, ignoring visibility and bypassing security checks, boxing the value if necessary.static float
getFloatField
(Object object, Field field) Get the value of a float field, ignoring visibility and bypassing security checks.static int
getIntField
(Object object, Field field) Get the value of an int field, ignoring visibility and bypassing security checks.static long
getLongField
(Object object, Field field) Get the value of a long field, ignoring visibility and bypassing security checks.static Object
getObjectField
(Object object, Field field) Get the value of an object field, ignoring visibility and bypassing security checks.static short
getShortField
(Object object, Field field) Get the value of a short field, ignoring visibility and bypassing security checks.static boolean
getStaticBooleanField
(Field field) Get the value of a static boolean field, ignoring visibility and bypassing security checks.static byte
getStaticByteField
(Field field) Get the value of a static byte field, ignoring visibility and bypassing security checks.static char
getStaticCharField
(Field field) Get the value of a static char field, ignoring visibility and bypassing security checks.static double
getStaticDoubleField
(Field field) Get the value of a static double field, ignoring visibility and bypassing security checks.static Object
getStaticField
(Field field) Get the value of a static field, ignoring visibility and bypassing security checks, boxing the value if necessary.static float
getStaticFloatField
(Field field) Get the value of a static float field, ignoring visibility and bypassing security checks.static int
getStaticIntField
(Field field) Get the value of a static int field, ignoring visibility and bypassing security checks.static long
getStaticLongField
(Field field) Get the value of a static long field, ignoring visibility and bypassing security checks.static Object
getStaticObjectField
(Field field) Get the value of a static object field, ignoring visibility and bypassing security checks.static short
getStaticShortField
(Field field) Get the value of a static short field, ignoring visibility and bypassing security checks.static boolean
invokeBooleanMethod
(Object object, Method method, Object... args) Invoke a non-static boolean-return-type method, ignoring visibility and bypassing security checks.static byte
invokeByteMethod
(Object object, Method method, Object... args) Invoke a non-static byte-return-type method, ignoring visibility and bypassing security checks.static char
invokeCharMethod
(Object object, Method method, Object... args) Invoke a non-static char-return-type method, ignoring visibility and bypassing security checks.static double
invokeDoubleMethod
(Object object, Method method, Object... args) Invoke a non-static double-return-type method, ignoring visibility and bypassing security checks.static float
invokeFloatMethod
(Object object, Method method, Object... args) Invoke a non-static float-return-type method, ignoring visibility and bypassing security checks.static int
invokeIntMethod
(Object object, Method method, Object... args) Invoke a non-static int-return-type method, ignoring visibility and bypassing security checks.static long
invokeLongMethod
(Object object, Method method, Object... args) Invoke a non-static long-return-type method, ignoring visibility and bypassing security checks.static Object
invokeMethod
(Object object, Method method, Object... args) Invoke a non-staticObject
-return-type method, ignoring visibility and bypassing security checks, boxing the result if necessary.static Object
invokeObjectMethod
(Object object, Method method, Object... args) Invoke a non-staticObject
-return-type method, ignoring visibility and bypassing security checks.static short
invokeShortMethod
(Object object, Method method, Object... args) Invoke a non-static short-return-type method, ignoring visibility and bypassing security checks.static boolean
invokeStaticBooleanMethod
(Method method, Object... args) Invoke a static boolean-return-type method, ignoring visibility and bypassing security checks.static byte
invokeStaticByteMethod
(Method method, Object... args) Invoke a static byte-return-type method, ignoring visibility and bypassing security checks.static char
invokeStaticCharMethod
(Method method, Object... args) Invoke a static char-return-type method, ignoring visibility and bypassing security checks.static double
invokeStaticDoubleMethod
(Method method, Object... args) Invoke a static double-return-type method, ignoring visibility and bypassing security checks.static float
invokeStaticFloatMethod
(Method method, Object... args) Invoke a static float-return-type method, ignoring visibility and bypassing security checks.static int
invokeStaticIntMethod
(Method method, Object... args) Invoke a static int-return-type method, ignoring visibility and bypassing security checks.static long
invokeStaticLongMethod
(Method method, Object... args) Invoke a static long-return-type method, ignoring visibility and bypassing security checks.static Object
invokeStaticMethod
(Method method, Object... args) Invoke a staticObject
-return-type method, ignoring visibility and bypassing security checks, boxing the result if necessary.static Object
invokeStaticObjectMethod
(Method method, Object... args) Invoke a staticObject
-return-type method, ignoring visibility and bypassing security checks.static short
invokeStaticShortMethod
(Method method, Object... args) Invoke a static short-return-type method, ignoring visibility and bypassing security checks.static void
invokeStaticVoidMethod
(Method method, Object... args) Invoke a static void-return-type method, ignoring visibility and bypassing security checks.static void
invokeVoidMethod
(Object object, Method method, Object... args) Invoke a non-static void-return-type method, ignoring visibility and bypassing security checks.static void
setBooleanField
(Object object, Field field, boolean val) Set the value of a boolean field, ignoring visibility and bypassing security checks.static void
setByteField
(Object object, Field field, byte val) Set the value of a byte field, ignoring visibility and bypassing security checks.static void
setCharField
(Object object, Field field, char val) Set the value of a char field, ignoring visibility and bypassing security checks.static void
setDoubleField
(Object object, Field field, double val) Set the value of a double field, ignoring visibility and bypassing security checks.static void
Set the value of an object field, ignoring visibility and bypassing security checks, unboxing the passed value if necessary.static void
setFloatField
(Object object, Field field, float val) Set the value of a float field, ignoring visibility and bypassing security checks.static void
setIntField
(Object object, Field field, int val) Set the value of an int field, ignoring visibility and bypassing security checks.static void
setLongField
(Object object, Field field, long val) Set the value of a long field, ignoring visibility and bypassing security checks.static void
setObjectField
(Object object, Field field, Object val) Set the value of a object field, ignoring visibility and bypassing security checks.static void
setShortField
(Object object, Field field, short val) Set the value of a short field, ignoring visibility and bypassing security checks.static void
setStaticBooleanField
(Field field, boolean val) Set the value of a static boolean field, ignoring visibility and bypassing security checks.static void
setStaticByteField
(Field field, byte val) Set the value of a static byte field, ignoring visibility and bypassing security checks.static void
setStaticCharField
(Field field, char val) Set the value of a static char field, ignoring visibility and bypassing security checks.static void
setStaticDoubleField
(Field field, double val) Set the value of a static double field, ignoring visibility and bypassing security checks.static void
setStaticField
(Field field, Object val) Set the value of a static field, ignoring visibility and bypassing security checks, unboxing the passed value if necessary.static void
setStaticFloatField
(Field field, float val) Set the value of a static float field, ignoring visibility and bypassing security checks.static void
setStaticIntField
(Field field, int val) Set the value of a static int field, ignoring visibility and bypassing security checks.static void
setStaticLongField
(Field field, long val) Set the value of a static long field, ignoring visibility and bypassing security checks.static void
setStaticObjectField
(Field field, Object val) Set the value of a static object field, ignoring visibility and bypassing security checks.static void
setStaticShortField
(Field field, short val) Set the value of a static short field, ignoring visibility and bypassing security checks.static void
sneakyThrow
(Throwable throwable) Throw aThrowable
without requiring a throws declaration.
-
Field Details
-
libraryLoaded
public static final boolean libraryLoadedWhether or not the library was successfully loaded. If this value is false, you will getUnsatisfiedLinkError
when you try calling methods in this class. -
getDeclaredMethods
-
getDeclaredConstructors
-
getDeclaredFields
-
DEBUG
private static final boolean DEBUG- See Also:
-
-
Constructor Details
-
Narcissus
public Narcissus()
-
-
Method Details
-
findClassInternal
-
findMethodInternal
-
findFieldInternal
-
findClass
Finds a class by name (e.g."com.xyz.MyClass"
) using the current classloader or the system classloader, ignoring visibility and bypassing security checks. Finds array classes if the class name is of the form"com.xyz.MyClass[][]"
.- Parameters:
className
- the class name- Returns:
- the class reference
-
allocateInstance
Allocate an object instance, without calling any constructor. (For internal use.)- Parameters:
cls
- the class to instantiate- Returns:
- the new object instance
-
sneakyThrow
Throw aThrowable
without requiring a throws declaration. (For internal use.)- Parameters:
throwable
- theThrowable
to throw
-
forAllMethods
Iterate through all methods in the given class, ignoring visibility and bypassing security checks. Also iterates up through superclasses, to collect all methods of the class and its superclasses.- Parameters:
cls
- the class
-
findMethod
public static Method findMethod(Class<?> cls, String methodName, Class<?>... paramTypes) throws NoSuchMethodException Find a method by name and parameter types in the given class, ignoring visibility and bypassing security checks.- Parameters:
cls
- the classmethodName
- the method name.paramTypes
- the parameter types of the method.- Returns:
- the
Method
- Throws:
NoSuchMethodException
- if the class does not contain a method of the given name
-
findConstructor
public static Constructor<?> findConstructor(Class<?> cls, Class<?>... paramTypes) throws NoSuchMethodException Find a constructor by parameter types in the given class, ignoring visibility and bypassing security checks.- Parameters:
cls
- the classparamTypes
- the parameter types of the constructor.- Returns:
- the
Method
- Throws:
NoSuchMethodException
- if the class does not contain a constructor of the given name
-
enumerateMethods
Enumerate all methods in the given class, ignoring visibility and bypassing security checks. Also iterates up through superclasses, to collect all methods of the class and its superclasses.- Parameters:
cls
- the class- Returns:
- a list of
Method
objects representing all methods declared by the class or a superclass.
-
findField
Find a field by name in the given class, ignoring visibility and bypassing security checks.- Parameters:
cls
- the classfieldName
- the field name.- Returns:
- the
Field
- Throws:
NoSuchFieldException
- if the class does not contain a field of the given name
-
enumerateFields
Enumerate all fields in the given class, ignoring visibility and bypassing security checks. Also iterates up through superclasses, to collect all fields of the class and its superclasses.- Parameters:
cls
- the class- Returns:
- a list of
Field
objects representing all fields declared by the class or a superclass.
-
getDeclaredMethods
Get declared methods, ignoring visibility and bypassing security checks.- Parameters:
cls
- the class- Returns:
- the declared methods
-
getDeclaredConstructors
Get declared constructors, ignoring visibility and bypassing security checks.- Type Parameters:
T
- the generic type- Parameters:
cls
- the class- Returns:
- the declared constructors
-
getDeclaredFields
Get declared fields, ignoring visibility and bypassing security checks.- Parameters:
cls
- the class- Returns:
- the declared fields
-
getIntField
Get the value of an int field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the int value of the field
-
getLongField
Get the value of a long field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the long value of the field
-
getShortField
Get the value of a short field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the short value of the field
-
getCharField
Get the value of a char field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the char value of the field
-
getBooleanField
Get the value of a boolean field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the boolean value of the field
-
getByteField
Get the value of a byte field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the byte value of the field
-
getFloatField
Get the value of a float field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the float value of the field.
-
getDoubleField
Get the value of a double field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the double value of the field
-
getObjectField
Get the value of an object field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the value of the field
-
getField
Get the value of an object field, ignoring visibility and bypassing security checks, boxing the value if necessary.- Parameters:
object
- the object instance to get the field value fromfield
- the non-static field- Returns:
- the value of the field
-
setIntField
Set the value of an int field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the int value to set
-
setLongField
Set the value of a long field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the long value to set
-
setShortField
Set the value of a short field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the short value to set
-
setCharField
Set the value of a char field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the char value to set
-
setBooleanField
Set the value of a boolean field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the boolean value to set
-
setByteField
Set the value of a byte field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the byte value to set
-
setFloatField
Set the value of a float field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the float value to set
-
setDoubleField
Set the value of a double field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the double value to set
-
setObjectField
Set the value of a object field, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the value to set
-
setField
Set the value of an object field, ignoring visibility and bypassing security checks, unboxing the passed value if necessary.- Parameters:
object
- the object instance in which to set the field valuefield
- the non-static fieldval
- the value to set
-
getStaticIntField
Get the value of a static int field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the int value of the static field
-
getStaticLongField
Get the value of a static long field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static long field
-
getStaticShortField
Get the value of a static short field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static short field
-
getStaticCharField
Get the value of a static char field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static char field
-
getStaticBooleanField
Get the value of a static boolean field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static boolean field
-
getStaticByteField
Get the value of a static byte field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static byte field
-
getStaticFloatField
Get the value of a static float field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static float field
-
getStaticDoubleField
Get the value of a static double field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static double field
-
getStaticObjectField
Get the value of a static object field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static field- Returns:
- the static object field
-
getStaticField
Get the value of a static field, ignoring visibility and bypassing security checks, boxing the value if necessary.- Parameters:
field
- the static field- Returns:
- the static field
-
setStaticIntField
Set the value of a static int field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the int value to set
-
setStaticLongField
Set the value of a static long field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the long value to set
-
setStaticShortField
Set the value of a static short field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the short value to set
-
setStaticCharField
Set the value of a static char field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the char value to set
-
setStaticBooleanField
Set the value of a static boolean field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the boolean value to set
-
setStaticByteField
Set the value of a static byte field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the byte value to set
-
setStaticFloatField
Set the value of a static float field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the float value to set
-
setStaticDoubleField
Set the value of a static double field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the double value to set
-
setStaticObjectField
Set the value of a static object field, ignoring visibility and bypassing security checks.- Parameters:
field
- the static fieldval
- the value to set
-
setStaticField
Set the value of a static field, ignoring visibility and bypassing security checks, unboxing the passed value if necessary.- Parameters:
field
- the static fieldval
- the value to set
-
invokeVoidMethod
Invoke a non-static void-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)
-
invokeIntMethod
Invoke a non-static int-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the int return value
-
invokeLongMethod
Invoke a non-static long-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the long return value
-
invokeShortMethod
Invoke a non-static short-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the short return value
-
invokeCharMethod
Invoke a non-static char-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the char return value
-
invokeBooleanMethod
Invoke a non-static boolean-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the boolean return value
-
invokeByteMethod
Invoke a non-static byte-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the byte return value
-
invokeFloatMethod
Invoke a non-static float-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the float return value
-
invokeDoubleMethod
Invoke a non-static double-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the double return value
-
invokeObjectMethod
Invoke a non-staticObject
-return-type method, ignoring visibility and bypassing security checks.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the return value
-
invokeMethod
Invoke a non-staticObject
-return-type method, ignoring visibility and bypassing security checks, boxing the result if necessary.- Parameters:
object
- the object instance to invoke the method onmethod
- the non-static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the return value (possibly a boxed value)
-
invokeStaticVoidMethod
Invoke a static void-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)
-
invokeStaticIntMethod
Invoke a static int-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the int return value
-
invokeStaticLongMethod
Invoke a static long-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the long return value
-
invokeStaticShortMethod
Invoke a static short-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the short return value
-
invokeStaticCharMethod
Invoke a static char-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the char return value
-
invokeStaticBooleanMethod
Invoke a static boolean-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the boolean return value
-
invokeStaticByteMethod
Invoke a static byte-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the byte return value
-
invokeStaticFloatMethod
Invoke a static float-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the float return value
-
invokeStaticDoubleMethod
Invoke a static double-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the double return value
-
invokeStaticObjectMethod
Invoke a staticObject
-return-type method, ignoring visibility and bypassing security checks.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the return value
-
invokeStaticMethod
Invoke a staticObject
-return-type method, ignoring visibility and bypassing security checks, boxing the result if necessary.- Parameters:
method
- the static methodargs
- the method arguments (ornew Object[0]
if there are no args)- Returns:
- the return value (possibly a boxed value)
-