proguard.retrace
Class ReTrace

java.lang.Object
  extended by proguard.retrace.ReTrace
All Implemented Interfaces:
MappingProcessor

public class ReTrace
extends Object
implements MappingProcessor

Tool for de-obfuscating stack traces of applications that were obfuscated with ProGuard.

Author:
Eric Lafortune

Field Summary
static String STACK_TRACE_EXPRESSION
           
 
Constructor Summary
ReTrace(String regularExpression, boolean verbose, File mappingFile)
          Creates a new ReTrace object to process stack traces on the standard input, based on the given mapping file name.
ReTrace(String regularExpression, boolean verbose, File mappingFile, File stackTraceFile)
          Creates a new ReTrace object to process a stack trace from the given file, based on the given mapping file name.
 
Method Summary
 void execute()
          Performs the subsequent ReTrace operations.
static void main(String[] args)
          The main program for ReTrace.
 boolean processClassMapping(String className, String newClassName)
           
 void processFieldMapping(String className, String fieldType, String fieldName, String newFieldName)
           
 void processMethodMapping(String className, int firstLineNumber, int lastLineNumber, String methodReturnType, String methodName, String methodArguments, String newMethodName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STACK_TRACE_EXPRESSION

public static final String STACK_TRACE_EXPRESSION
See Also:
Constant Field Values
Constructor Detail

ReTrace

public ReTrace(String regularExpression,
               boolean verbose,
               File mappingFile)
Creates a new ReTrace object to process stack traces on the standard input, based on the given mapping file name.

Parameters:
regularExpression - the regular expression for parsing the lines in the stack trace.
verbose - specifies whether the de-obfuscated stack trace should be verbose.
mappingFile - the mapping file that was written out by ProGuard.

ReTrace

public ReTrace(String regularExpression,
               boolean verbose,
               File mappingFile,
               File stackTraceFile)
Creates a new ReTrace object to process a stack trace from the given file, based on the given mapping file name.

Parameters:
regularExpression - the regular expression for parsing the lines in the stack trace.
verbose - specifies whether the de-obfuscated stack trace should be verbose.
mappingFile - the mapping file that was written out by ProGuard.
stackTraceFile - the optional name of the file that contains the stack trace.
Method Detail

execute

public void execute()
             throws IOException
Performs the subsequent ReTrace operations.

Throws:
IOException

processClassMapping

public boolean processClassMapping(String className,
                                   String newClassName)
Specified by:
processClassMapping in interface MappingProcessor

processFieldMapping

public void processFieldMapping(String className,
                                String fieldType,
                                String fieldName,
                                String newFieldName)
Specified by:
processFieldMapping in interface MappingProcessor

processMethodMapping

public void processMethodMapping(String className,
                                 int firstLineNumber,
                                 int lastLineNumber,
                                 String methodReturnType,
                                 String methodName,
                                 String methodArguments,
                                 String newMethodName)
Specified by:
processMethodMapping in interface MappingProcessor

main

public static void main(String[] args)
The main program for ReTrace.



Copyright © 2012. All Rights Reserved.