Package proguard.examples.util
Class ExampleUtil
- java.lang.Object
-
- proguard.examples.util.ExampleUtil
-
public class ExampleUtil extends java.lang.ObjectUtility methods used by examples.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddClass(ClassPool classPool, java.lang.Class<?>... classes)Add the given JavaClasses to aClassPool.static ClassPoolcreateClassPool(java.lang.Class<?>... classes)Create aClassPoolfor the given JavaClasses.static java.lang.ObjectexecuteMainMethod(ClassPool classPool, java.lang.String internalClassName)Execute the "main" method of a ProGuardCORE class in the givenClassPoolwith the specified name.static java.lang.ObjectexecuteMainMethod(ClassPool classPool, java.lang.String internalClassName, java.lang.String... arguments)Execute the "main" method of a ProGuardCORE class in the givenClassPoolwith the specified name and the specified arguments.static java.lang.ObjectexecuteMainMethod(ProgramClass programClass)Execute the "main" method of a ProGuardCOREProgramClass.static java.lang.ObjectexecuteMethod(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 givenClassPoolwith the specified name and the specified arguments.
-
-
-
Method Detail
-
createClassPool
public static ClassPool createClassPool(java.lang.Class<?>... classes)
Create aClassPoolfor the given JavaClasses.
-
addClass
public static void addClass(ClassPool classPool, java.lang.Class<?>... classes)
Add the given JavaClasses to aClassPool.
-
executeMainMethod
public static java.lang.Object executeMainMethod(ProgramClass programClass)
Execute the "main" method of a ProGuardCOREProgramClass.
-
executeMainMethod
public static java.lang.Object executeMainMethod(ClassPool classPool, java.lang.String internalClassName)
Execute the "main" method of a ProGuardCORE class in the givenClassPoolwith the specified name.
-
executeMainMethod
public 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 givenClassPoolwith the specified name and the specified arguments.
-
executeMethod
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
Execute the specified method of a ProGuardCORE class in the givenClassPoolwith the specified name and the specified arguments.- Throws:
java.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessException
-
-