public class ExampleUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addClass(ClassPool classPool,
java.lang.Class<?>... classes)
Add the given Java
Class es to a ClassPool . |
static ClassPool |
createClassPool(java.lang.Class<?>... classes)
Create a
ClassPool for the given Java Class es. |
static java.lang.Object |
executeMainMethod(ClassPool classPool,
java.lang.String internalClassName)
Execute the "main" method of a ProGuardCORE class in the given
ClassPool with the
specified name. |
static java.lang.Object |
executeMainMethod(ClassPool classPool,
java.lang.String internalClassName,
java.lang.String... arguments)
Execute the "main" method of a ProGuardCORE class in the given
ClassPool with the
specified name and the specified arguments. |
static java.lang.Object |
executeMainMethod(ProgramClass programClass)
Execute the "main" method of a ProGuardCORE
ProgramClass . |
static java.lang.Object |
executeMethod(ClassPool classPool,
java.lang.String internalClassName,
java.lang.String methodName,
java.lang.Class<?>[] parameterTypes,
java.lang.Object[] arguments)
Execute the specified method of a ProGuardCORE class in the given
ClassPool with the
specified name and the specified arguments. |
public static ClassPool createClassPool(java.lang.Class<?>... classes)
ClassPool
for the given Java Class
es.public static void addClass(ClassPool classPool, java.lang.Class<?>... classes)
Class
es to a ClassPool
.public static java.lang.Object executeMainMethod(ProgramClass programClass)
ProgramClass
.public static java.lang.Object executeMainMethod(ClassPool classPool, java.lang.String internalClassName)
ClassPool
with the
specified name.public static java.lang.Object executeMainMethod(ClassPool classPool, java.lang.String internalClassName, java.lang.String... arguments)
ClassPool
with the
specified name and the specified arguments.public static java.lang.Object executeMethod(ClassPool classPool, java.lang.String internalClassName, java.lang.String methodName, java.lang.Class<?>[] parameterTypes, java.lang.Object[] arguments) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
ClassPool
with the
specified name and the specified arguments.java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException