Package proguard.examples.util
Class ExampleUtil
- java.lang.Object
-
- proguard.examples.util.ExampleUtil
-
public class ExampleUtil extends java.lang.Object
Utility methods used by examples.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addClass(ClassPool classPool, java.lang.Class<?>... classes)
Add the given JavaClass
es to aClassPool
.static ClassPool
createClassPool(java.lang.Class<?>... classes)
Create aClassPool
for the given JavaClass
es.static java.lang.Object
executeMainMethod(ClassPool classPool, java.lang.String internalClassName)
Execute the "main" method of a ProGuardCORE class in the givenClassPool
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 givenClassPool
with the specified name and the specified arguments.static java.lang.Object
executeMainMethod(ProgramClass programClass)
Execute the "main" method of a ProGuardCOREProgramClass
.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 givenClassPool
with the specified name and the specified arguments.
-
-
-
Method Detail
-
createClassPool
public static ClassPool createClassPool(java.lang.Class<?>... classes)
Create aClassPool
for the given JavaClass
es.
-
addClass
public static void addClass(ClassPool classPool, java.lang.Class<?>... classes)
Add the given JavaClass
es 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 givenClassPool
with 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 givenClassPool
with 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 givenClassPool
with the specified name and the specified arguments.- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
-
-