public class ConfigurationLogger
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurationLogger.ClassInfo
Container of processing information of a class.
|
static class |
ConfigurationLogger.MemberInfo |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_DECLARED_CONSTRUCTORS_KEPT |
static int |
ALL_DECLARED_FIELDS_KEPT |
static int |
ALL_DECLARED_METHODS_KEPT |
static int |
ALL_PUBLIC_CONSTRUCTORS_KEPT |
static int |
ALL_PUBLIC_FIELDS_KEPT |
static int |
ALL_PUBLIC_METHODS_KEPT |
static int |
CLASS_KEPT |
static java.lang.String |
CLASS_MAP_FILENAME |
static int |
CLASS_SHRUNK |
static int |
MEMBER_KEPT |
static int |
MEMBER_SHRUNK |
| Constructor and Description |
|---|
ConfigurationLogger() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkClass(java.lang.String reflectionClassName,
java.lang.String reflectionMethodName,
java.lang.String reflectedClassName,
java.lang.String callingClassName)
Check if a class that is loaded via reflection is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkForName(java.lang.String reflectedClassName,
java.lang.String callingClassName)
Check if a class that is loaded via Class.forName() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetConstructor(java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
Check if a constructor that is retrieved via Class.getConstructor() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetConstructor(java.lang.String reflectionMethodName,
java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
Check if a constructor that is retrieved via reflection is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetConstructors(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the constructors of a class on which getConstructors() is called are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredConstructor(java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
Check if a constructor that is retrieved via Class.getDeclaredConstructor() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredConstructors(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the constructors of a class on which getDeclaredConstructors() is called are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredField(java.lang.Class reflectedClass,
java.lang.String reflectedFieldName,
java.lang.String callingClassName)
Check if a field that is retrieved via Class.getDeclaredField() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredFields(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the fields of a class whose fields are retrieved via Class.getDeclaredFields() are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredMethod(java.lang.Class reflectedClass,
java.lang.String reflectedMethodName,
java.lang.Class[] reflectedMethodParameters,
java.lang.String callingClassName)
Check if a method that is retrieved via Class.getDeclaredMethod() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetDeclaredMethods(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the methods of a class on which getDeclaredMethods() is called are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetField(java.lang.Class reflectedClass,
java.lang.String reflectedFieldName,
java.lang.String callingClassName)
Check if a field that is retrieved via Class.getField() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetFields(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the fields of a class whose fields are retrieved via Class.getFields() are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetMethod(java.lang.Class reflectedClass,
java.lang.String reflectedMethodName,
java.lang.Class[] reflectedMethodParameters,
java.lang.String callingClassName)
Check if a method that is retrieved via Class.getMethod() is kept and if not,
log a keep rule suggestion for it.
|
static void |
checkGetMethods(java.lang.Class reflectedClass,
java.lang.String callingClassName)
Check if the methods of a class on which getMethods() is called are all kept and if not,
log a keep rule suggestion for it.
|
static void |
checkLoadClass(java.lang.String reflectedClassName,
java.lang.String callingClassName)
Check if a class that is loaded via ClassLoader.loadClass() is kept and if not,
log a keep rule suggestion for it.
|
static void |
loadClassMap(java.io.InputStream inputStream,
java.util.Map<java.lang.String,ConfigurationLogger.ClassInfo> map)
Load a classmap.txt file into a map.
|
void |
run() |
public static final java.lang.String CLASS_MAP_FILENAME
public static final int CLASS_KEPT
public static final int ALL_DECLARED_CONSTRUCTORS_KEPT
public static final int ALL_PUBLIC_CONSTRUCTORS_KEPT
public static final int ALL_DECLARED_FIELDS_KEPT
public static final int ALL_PUBLIC_FIELDS_KEPT
public static final int ALL_DECLARED_METHODS_KEPT
public static final int ALL_PUBLIC_METHODS_KEPT
public static final int CLASS_SHRUNK
public static final int MEMBER_KEPT
public static final int MEMBER_SHRUNK
public static void checkForName(java.lang.String reflectedClassName,
java.lang.String callingClassName)
reflectedClassName - the name of the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkLoadClass(java.lang.String reflectedClassName,
java.lang.String callingClassName)
reflectedClassName - the name of the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkClass(java.lang.String reflectionClassName,
java.lang.String reflectionMethodName,
java.lang.String reflectedClassName,
java.lang.String callingClassName)
reflectedClassName - the name of the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkGetField(java.lang.Class reflectedClass,
java.lang.String reflectedFieldName,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.reflectedFieldName - the field that is retrieved via reflection.callingClassName - the class from which the reflection API is called.public static void checkGetDeclaredField(java.lang.Class reflectedClass,
java.lang.String reflectedFieldName,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.reflectedFieldName - the field that is retrieved via reflection.callingClassName - the class from which the reflection API is called.public static void checkGetDeclaredFields(java.lang.Class reflectedClass,
java.lang.String callingClassName)
callingClassName - the class from which the reflection API is called.reflectedClass - the class that is introspected.public static void checkGetFields(java.lang.Class reflectedClass,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkGetDeclaredConstructor(java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
public static void checkGetConstructor(java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
public static void checkGetConstructor(java.lang.String reflectionMethodName,
java.lang.Class reflectedClass,
java.lang.Class[] constructorParameters,
java.lang.String callingClassName)
public static void checkGetDeclaredConstructors(java.lang.Class reflectedClass,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkGetConstructors(java.lang.Class reflectedClass,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkGetDeclaredMethod(java.lang.Class reflectedClass,
java.lang.String reflectedMethodName,
java.lang.Class[] reflectedMethodParameters,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.reflectedMethodName - the method that is retrieved via reflection.reflectedMethodParameters - the parameters of the method that is retrieved via reflection.callingClassName - the class from which the reflection API is called.public static void checkGetMethod(java.lang.Class reflectedClass,
java.lang.String reflectedMethodName,
java.lang.Class[] reflectedMethodParameters,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.reflectedMethodName - the method that is retrieved via reflection.reflectedMethodParameters - the parameters of the method that is retrieved via reflection.callingClassName - the class from which the reflection API is called.public static void checkGetDeclaredMethods(java.lang.Class reflectedClass,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.callingClassName - the class from which the reflection API is called.public static void checkGetMethods(java.lang.Class reflectedClass,
java.lang.String callingClassName)
reflectedClass - the class that is introspected.callingClassName - the class from which the reflection API is called.public void run()
run in interface java.lang.Runnablepublic static void loadClassMap(java.io.InputStream inputStream,
java.util.Map<java.lang.String,ConfigurationLogger.ClassInfo> map)
throws java.io.IOException
inputStream - Input stream from which to read the info.map - The map to load the info into.java.io.IOException - If the input stream could not be read.