Example #1
0
  public void processMethodMapping(
      String className,
      int firstLineNumber,
      int lastLineNumber,
      String methodReturnType,
      String methodName,
      String methodArguments,
      String newMethodName) {
    // Original class name -> obfuscated method names.
    Map methodMap = (Map) classMethodMap.get(className);
    if (methodMap == null) {
      methodMap = new HashMap();
      classMethodMap.put(className, methodMap);
    }

    // Obfuscated method name -> methods.
    Set methodSet = (Set) methodMap.get(newMethodName);
    if (methodSet == null) {
      methodSet = new LinkedHashSet();
      methodMap.put(newMethodName, methodSet);
    }

    // Add the method information.
    methodSet.add(
        new MethodInfo(
            firstLineNumber, lastLineNumber, methodReturnType, methodArguments, methodName));
  }
Example #2
0
  public void processFieldMapping(
      String className, String fieldType, String fieldName, String newFieldName) {
    // Original class name -> obfuscated field names.
    Map fieldMap = (Map) classFieldMap.get(className);
    if (fieldMap == null) {
      fieldMap = new HashMap();
      classFieldMap.put(className, fieldMap);
    }

    // Obfuscated field name -> fields.
    Set fieldSet = (Set) fieldMap.get(newFieldName);
    if (fieldSet == null) {
      fieldSet = new LinkedHashSet();
      fieldMap.put(newFieldName, fieldSet);
    }

    // Add the field information.
    fieldSet.add(new FieldInfo(fieldType, fieldName));
  }