proguard.obfuscate
Class MappingKeeper

java.lang.Object
  extended by proguard.obfuscate.MappingKeeper
All Implemented Interfaces:
MappingProcessor

public class MappingKeeper
extends java.lang.Object
implements MappingProcessor

This MappingKeeper applies the mappings that it receives to its class pool, so these mappings are ensured in a subsequent obfuscation step.


Constructor Summary
MappingKeeper(ClassPool classPool, WarningPrinter warningPrinter)
          Creates a new MappingKeeper.
 
Method Summary
 boolean processClassMapping(java.lang.String className, java.lang.String newClassName)
          Processes the given class name mapping.
 void processFieldMapping(java.lang.String className, java.lang.String fieldType, java.lang.String fieldName, java.lang.String newFieldName)
          Processes the given field name mapping.
 void processMethodMapping(java.lang.String className, int firstLineNumber, int lastLineNumber, java.lang.String methodReturnType, java.lang.String methodName, java.lang.String methodArguments, java.lang.String newMethodName)
          Processes the given method name mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingKeeper

public MappingKeeper(ClassPool classPool,
                     WarningPrinter warningPrinter)
Creates a new MappingKeeper.

Parameters:
classPool - the class pool in which class names and class member names have to be mapped.
warningPrinter - the optional warning printer to which warnings can be printed.
Method Detail

processClassMapping

public boolean processClassMapping(java.lang.String className,
                                   java.lang.String newClassName)
Description copied from interface: MappingProcessor
Processes the given class name mapping.

Specified by:
processClassMapping in interface MappingProcessor
Parameters:
className - the original class name.
newClassName - the new class name.
Returns:
whether the processor is interested in receiving mappings of the class members of this class.

processFieldMapping

public void processFieldMapping(java.lang.String className,
                                java.lang.String fieldType,
                                java.lang.String fieldName,
                                java.lang.String newFieldName)
Description copied from interface: MappingProcessor
Processes the given field name mapping.

Specified by:
processFieldMapping in interface MappingProcessor
Parameters:
className - the original class name.
fieldType - the original external field type.
fieldName - the original field name.
newFieldName - the new field name.

processMethodMapping

public void processMethodMapping(java.lang.String className,
                                 int firstLineNumber,
                                 int lastLineNumber,
                                 java.lang.String methodReturnType,
                                 java.lang.String methodName,
                                 java.lang.String methodArguments,
                                 java.lang.String newMethodName)
Description copied from interface: MappingProcessor
Processes the given method name mapping.

Specified by:
processMethodMapping in interface MappingProcessor
Parameters:
className - the original class name.
firstLineNumber - the first line number of the method, or 0 if it is not known.
lastLineNumber - the last line number of the method, or 0 if it is not known.
methodReturnType - the original external method return type.
methodName - the original external method name.
methodArguments - the original external method arguments.
newMethodName - the new method name.