| java.lang.Object com.yworks.yguard.obf.ClassTree
ClassTree | public class ClassTree implements NameMapper(Code) | | Tree structure of package levels, classes, methods and fields used for obfuscation.
author: Mark Welsh |
Method Summary | |
public void | addClassFile(ClassFile cf) Add a classfile's package, class, method and field entries to database. | public void | dump(PrintWriter log) Dump the content of the class tree to the specified file (used for logging). | public Cl | findClassForName(String name) | public TreeItem | findTreeItem(String[] nameParts) finds tree items by looking for name components only... | public void | generateNames() Traverse the class tree, generating obfuscated names within each namespace. | public String[] | getAttrsToKeep() Return a list of attributes marked to keep. | public String[] | getAttrsToKeep(String className) | public Cl | getCl(String fullName) Get class in tree from the fully qualified name, returning null if name not found. | public Enumeration | getClEnum(String fullName) Get classes in tree from the fully qualified name
(can be wildcarded). | public Enumeration | getClEnum(String fullName, int classMode) Get classes in tree from the fully qualified name
(can be wildcarded). | public Fd | getFd(String fullName) Get field in tree from the fully qualified name. | public Enumeration | getFdEnum(String fullName) Get fields in tree from the fully qualified, and possibly
wildcarded, name. | public Md | getMd(String fullName, String descriptor) Get method in tree from the fully qualified name. | public Enumeration | getMdEnum(String fullName, String descriptor) Get methods in tree from the fully qualified, and possibly
wildcarded, name. | public static Enumeration | getNameEnum(String name) Return a fully qualified name broken into package/class segments. | public String | getOutName(String inName) Update the path of the passed filename, if that path corresponds to a package. | public Pk | getPk(String fullName) Get package in tree from the fully qualified name, returning null if name not found. | public Pk | getRoot() Return the root node. | public boolean | isPedantic() Getter for property pedantic. | public boolean | isReplaceClassNameStrings() Getter for property replaceClassNameStrings. | public String | mapAnnotationField(String className, String methodName) Mapping for annotation field/method name, of fully qualified class. | public String | mapClass(String className) Mapping for fully qualified class name. | public String | mapDescriptor(String descriptor) Mapping for descriptor of field or method. | public String | mapField(String className, String fieldName) Mapping for field name, of fully qualified class. | public boolean | mapLineNumberTable(String className, String methodName, String methodSignature, LineNumberTableAttrInfo info) | public String | mapLocalVariable(String thisClassName, String methodName, String descriptor, String string) | public String | mapMethod(String className, String methodName, String descriptor) Mapping for method name, of fully qualified class. | public String | mapSignature(String signature) Mapping for signatures (used for generics in 1.5). | public String | mapSourceFile(String className, String sourceFileName) | public void | resolveClasses() Resolve the polymorphic dependencies of each class. | public void | retainAttribute(String name) Mark an attribute type for retention. | public void | retainAttributeForClass(String className, String attributeDescriptor) | public void | retainClass(String name, int classLevel, int methodLevel, int fieldLevel, boolean retainHierarchy) Mark a class/interface type (and possibly methods and fields defined in class) for retention. | public void | retainClassMap(String name, String obfName) Mark a class/interface type for retention, and specify its new name. | public void | retainField(String name) Mark a field type for retention. | public void | retainFieldMap(String name, String obfName) Mark a field type for retention, and specify its new name. | public void | retainLineNumberTable(String name, LineNumberTableMapper lineNumberTableMapper) | public void | retainMethod(String name, String descriptor) Mark a method type for retention. | public void | retainMethodMap(String name, String descriptor, String obfName) Mark a method type for retention, and specify its new name. | public void | retainPackage(String packageName) | public void | retainPackageMap(String name, String obfName) Mark a package for retention, and specify its new name. | public void | retainSourceFileAttributeMap(String name, String obfName) | public void | setPedantic(boolean pedantic) Setter for property pedantic. | public void | setReplaceClassNameStrings(boolean replaceClassNameStrings) Setter for property replaceClassNameStrings. | final public static String | toUtf8XmlString(String s) | public void | walkTree(TreeAction ta) Walk the whole tree taking action once only on each package level, class, method and field. |
CLASS_LEVEL | final public static char CLASS_LEVEL(Code) | | |
METHOD_FIELD_LEVEL | final public static char METHOD_FIELD_LEVEL(Code) | | |
PACKAGE_LEVEL | final public static char PACKAGE_LEVEL(Code) | | |
ClassTree | public ClassTree()(Code) | | Ctor.
|
addClassFile | public void addClassFile(ClassFile cf)(Code) | | Add a classfile's package, class, method and field entries to database.
|
dump | public void dump(PrintWriter log)(Code) | | Dump the content of the class tree to the specified file (used for logging).
|
findClassForName | public Cl findClassForName(String name)(Code) | | walks the tree of TreeItems in order to find a class forName
|
findTreeItem | public TreeItem findTreeItem(String[] nameParts)(Code) | | finds tree items by looking for name components only...
|
generateNames | public void generateNames()(Code) | | Traverse the class tree, generating obfuscated names within each namespace.
|
getAttrsToKeep | public String[] getAttrsToKeep()(Code) | | Return a list of attributes marked to keep.
|
getCl | public Cl getCl(String fullName)(Code) | | Get class in tree from the fully qualified name, returning null if name not found.
|
getClEnum | public Enumeration getClEnum(String fullName)(Code) | | Get classes in tree from the fully qualified name
(can be wildcarded).
|
getClEnum | public Enumeration getClEnum(String fullName, int classMode)(Code) | | Get classes in tree from the fully qualified name
(can be wildcarded).
|
getFd | public Fd getFd(String fullName)(Code) | | Get field in tree from the fully qualified name.
|
getFdEnum | public Enumeration getFdEnum(String fullName)(Code) | | Get fields in tree from the fully qualified, and possibly
wildcarded, name.
|
getMd | public Md getMd(String fullName, String descriptor)(Code) | | Get method in tree from the fully qualified name.
|
getMdEnum | public Enumeration getMdEnum(String fullName, String descriptor)(Code) | | Get methods in tree from the fully qualified, and possibly
wildcarded, name.
|
getNameEnum | public static Enumeration getNameEnum(String name)(Code) | | Return a fully qualified name broken into package/class segments.
|
getOutName | public String getOutName(String inName)(Code) | | Update the path of the passed filename, if that path corresponds to a package.
|
getPk | public Pk getPk(String fullName)(Code) | | Get package in tree from the fully qualified name, returning null if name not found.
|
getRoot | public Pk getRoot()(Code) | | Return the root node.
|
isPedantic | public boolean isPedantic()(Code) | | Getter for property pedantic.
Value of property pedantic. |
isReplaceClassNameStrings | public boolean isReplaceClassNameStrings()(Code) | | Getter for property replaceClassNameStrings.
Value of property replaceClassNameStrings. |
retainAttribute | public void retainAttribute(String name)(Code) | | Mark an attribute type for retention.
|
retainAttributeForClass | public void retainAttributeForClass(String className, String attributeDescriptor)(Code) | | |
retainClass | public void retainClass(String name, int classLevel, int methodLevel, int fieldLevel, boolean retainHierarchy)(Code) | | Mark a class/interface type (and possibly methods and fields defined in class) for retention.
|
retainClassMap | public void retainClassMap(String name, String obfName)(Code) | | Mark a class/interface type for retention, and specify its new name.
|
retainField | public void retainField(String name)(Code) | | Mark a field type for retention.
|
retainFieldMap | public void retainFieldMap(String name, String obfName)(Code) | | Mark a field type for retention, and specify its new name.
|
retainMethod | public void retainMethod(String name, String descriptor)(Code) | | Mark a method type for retention.
|
retainMethodMap | public void retainMethodMap(String name, String descriptor, String obfName)(Code) | | Mark a method type for retention, and specify its new name.
|
retainPackage | public void retainPackage(String packageName)(Code) | | |
retainPackageMap | public void retainPackageMap(String name, String obfName)(Code) | | Mark a package for retention, and specify its new name.
|
retainSourceFileAttributeMap | public void retainSourceFileAttributeMap(String name, String obfName)(Code) | | |
setPedantic | public void setPedantic(boolean pedantic)(Code) | | Setter for property pedantic.
Parameters: pedantic - New value of property pedantic. |
setReplaceClassNameStrings | public void setReplaceClassNameStrings(boolean replaceClassNameStrings)(Code) | | Setter for property replaceClassNameStrings.
Parameters: replaceClassNameStrings - New value of property replaceClassNameStrings. |
walkTree | public void walkTree(TreeAction ta)(Code) | | Walk the whole tree taking action once only on each package level, class, method and field.
|
|
|