コード例 #1
0
 public void visitProgramField(ProgramClass programClass, ProgramField programField) {
   String newName = MemberObfuscator.newMemberName(programField);
   if (newName != null) {
     ps.println(
         "    "
             +
             // lineNumberRange(programClass, programField) +
             ClassUtil.externalFullFieldDescription(
                 0, programField.getName(programClass), programField.getDescriptor(programClass))
             + " -> "
             + newName);
   }
 }
コード例 #2
0
  public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) {
    // Special cases: <clinit> and <init> are always kept unchanged.
    // We can ignore them here.
    String name = programMethod.getName(programClass);
    if (name.equals(ClassConstants.INTERNAL_METHOD_NAME_CLINIT)
        || name.equals(ClassConstants.INTERNAL_METHOD_NAME_INIT)) {
      return;
    }

    String newName = MemberObfuscator.newMemberName(programMethod);
    if (newName != null) {
      ps.println(
          "    "
              + lineNumberRange(programClass, programMethod)
              + ClassUtil.externalFullMethodDescription(
                  programClass.getName(),
                  0,
                  programMethod.getName(programClass),
                  programMethod.getDescriptor(programClass))
              + " -> "
              + newName);
    }
  }