Method Summary |
|
public static String | backTranslate(String name) Translate a class name from the the regular '.' convention to internal '/' one. |
public static ClassFile | create(DataInput din) Create a new ClassFile from the class file format data in the DataInput
stream. |
public void | dump(PrintWriter pw) Dump the content of the class file to the specified file (used for debugging). |
protected CpInfo | getCpEntry(int cpIndex) Lookup the entry in the constant pool and return as an Object. |
public String[] | getDangerousMethods() List methods which can break obfuscated code, and log to a String[]. |
public FieldInfo | getField(int i) Return i'th field in class. |
public int | getFieldCount() Return number of fields in class. |
public String[] | getInterfaces() Return the names of this class's interfaces. |
public int | getMajorVersion() Return major version of this class's file format. |
public MethodInfo | getMethod(int i) Return i'th method in class. |
public int | getMethodCount() Return number of methods in class. |
public int | getModifiers() Return the access modifiers for this classfile. |
public String | getName() Return the name of this classfile. |
public String | getSuper() Return the name of this class's superclass. |
protected String | getUtf8(int cpIndex) Lookup the UTF8 string in the constant pool. |
public boolean | hasIncompatibleVersion() |
public boolean | hasReflection() |
public Vector | listDangerMethods(Vector list) List methods which can break obfuscated code, and log to a Vector. |
public void | markNTRefs(ConstantPool pool) Check for direct references to NameAndType constant pool entries. |
public void | markUtf8Refs(ConstantPool pool) Check for direct references to Utf8 constant pool entries. |
public static String[] | parseDescriptor(String descriptor) Parse a method or field descriptor into a list of parameter names (for methods)
and a return type, in same format as the Class.forName() method returns . |
public static String[] | parseDescriptor(String descriptor, boolean isDisplay) Parse a method or field descriptor into a list of parameter names (for methods)
and a return type, optionally in same format as the Class.forName() method returns . |
public static String[] | parseDescriptor(String descriptor, boolean isDisplay, boolean doTranslate) Parse a method or field descriptor into a list of parameter names (for methods)
and a return type, in same format as the Class.forName() method returns . |
public void | remap(NameMapper nm, PrintWriter log, boolean enableMapClassString, boolean enableDummySourceFile) Remap the entities in the specified ClassFile. |
public int | remapUtf8To(String newString, int oldIndex) Remap a specified Utf8 entry to the given value and return its new index. |
public void | removeField(int i) Remove i'th field from class. |
public void | removeMethod(int i) Remove i'th method from class. |
public void | setDummySourceFile() |
public void | setIdString(String id) Define a constant String to include in this output class file. |
public static String | translate(String name) Translate a class name from the internal '/' convention to the regular '.' one. |
public static String | translateType(String inName, boolean isDisplay) Translate a type specifier from the internal JVM convention to the Class.forName() one. |
public void | trimAttrs() Trim attributes from the classfile ('Code', 'Exceptions', 'ConstantValue'
are preserved, all others are killed). |
public void | trimAttrs(NameMapper nm) Remove unnecessary attributes from the class. |
public void | trimAttrsExcept(String[] extraAttrs) Trim attributes from the classfile ('Code', 'Exceptions', 'ConstantValue'
are preserved, all others except the list in the String[] are killed). |
public void | updateRefCount() Update the constant pool reference counts. |
public void | write(DataOutput dout) Export the representation to a DataOutput stream. |