Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.obfuscator
Class ClassIdentifier

java.lang.Object
  extended bynet.sf.jode.obfuscator.Identifier
      extended bynet.sf.jode.obfuscator.ClassIdentifier

public class ClassIdentifier
extends Identifier


Constructor Summary
ClassIdentifier(PackageIdentifier pack, java.lang.String fullName, java.lang.String name, ClassInfo info)
           
 
Method Summary
 void addIfaces(java.util.Collection result, ClassIdentifier ancestor)
          Add the ClassInfo objects of the interfaces of ancestor.
 void addSubClass(ClassIdentifier ci)
           
 void addSUID()
           
 void analyze()
          This is called by ClassBundle when it a class is added with ClassBundle.analyzeIdentifier().
 void analyzeSuperClasses(ClassInfo superclass)
           
 long calcSerialVersionUID()
          This is partly taken from the classpath project.
 void chainMethodIdentifier(Identifier chainIdent)
           
 boolean conflicting(java.lang.String newAlias)
           
 boolean containsFieldAliasDirectly(java.lang.String fieldName, java.lang.String typeSig, IdentifierMatcher matcher)
           
 boolean containsMethodAliasDirectly(java.lang.String methodName, java.lang.String paramType, IdentifierMatcher matcher)
           
 void doTransformations()
           
 boolean fieldConflicts(FieldIdentifier field, java.lang.String newAlias)
           
 java.util.Iterator getChilds()
           
 java.util.List getFieldIdents()
           
 java.lang.String getFullAlias()
           
 java.lang.String getFullName()
           
 Identifier getIdentifier(java.lang.String fieldName, java.lang.String typeSig)
           
 java.util.List getMethodIdents()
           
 int getModifiers()
           
 java.lang.String getName()
           
 Identifier getParent()
           
 java.lang.String getType()
           
 boolean hasSUID()
           
 void initClass()
           
 void initSuperClasses(ClassInfo superclass)
           
 boolean isSerializable()
           
 boolean methodConflicts(MethodIdentifier method, java.lang.String newAlias)
           
 void reachableReference(Reference ref, boolean isVirtual)
           
protected  void setSinglePreserved()
          Marks the package as preserved, too.
 void setSingleReachable()
          Marks this identifier as reachable.
 void storeClass(java.io.DataOutputStream out)
           
 java.lang.String toString()
           
 void transformInnerClasses()
           
 void transformSuperIfaces()
          Generates the new super class and interfaces, removing super classes and interfaces that are not reachable.
 
Methods inherited from class net.sf.jode.obfuscator.Identifier
addShadow, applyPreserveRule, buildTable, getAlias, getRepresentative, isPreserved, isReachable, isRepresentative, readTable, setAlias, setPreserved, setReachable, wasAliased, writeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassIdentifier

public ClassIdentifier(PackageIdentifier pack,
                       java.lang.String fullName,
                       java.lang.String name,
                       ClassInfo info)
Method Detail

addSubClass

public void addSubClass(ClassIdentifier ci)

reachableReference

public void reachableReference(Reference ref,
                               boolean isVirtual)

chainMethodIdentifier

public void chainMethodIdentifier(Identifier chainIdent)

calcSerialVersionUID

public long calcSerialVersionUID()
This is partly taken from the classpath project.


addSUID

public void addSUID()

isSerializable

public boolean isSerializable()

hasSUID

public boolean hasSUID()

setSinglePreserved

protected void setSinglePreserved()
Marks the package as preserved, too.

Overrides:
setSinglePreserved in class Identifier

setSingleReachable

public void setSingleReachable()
Description copied from class: Identifier
Marks this identifier as reachable. You should override this method for method identifier, which may mark other methods as reachable. You shouldn't call this directly, but use setReachable instead.

Overrides:
setSingleReachable in class Identifier

analyzeSuperClasses

public void analyzeSuperClasses(ClassInfo superclass)

analyze

public void analyze()
Description copied from class: Identifier
This is called by ClassBundle when it a class is added with ClassBundle.analyzeIdentifier().

Overrides:
analyze in class Identifier

initSuperClasses

public void initSuperClasses(ClassInfo superclass)

initClass

public void initClass()

addIfaces

public void addIfaces(java.util.Collection result,
                      ClassIdentifier ancestor)
Add the ClassInfo objects of the interfaces of ancestor. But if an interface of ancestor is not reachable it will add its interfaces instead.

Parameters:
result - The Collection where the interfaces should be added to.
ancestor - The ancestor whose interfaces should be added.

transformSuperIfaces

public void transformSuperIfaces()
Generates the new super class and interfaces, removing super classes and interfaces that are not reachable.

Returns:
an array of class names (full qualified, dot separated) where the first entry is the super class (may be null) and the other entries are the interfaces.

transformInnerClasses

public void transformInnerClasses()

doTransformations

public void doTransformations()

storeClass

public void storeClass(java.io.DataOutputStream out)
                throws java.io.IOException
Throws:
java.io.IOException

getParent

public Identifier getParent()
Specified by:
getParent in class Identifier

getFullName

public java.lang.String getFullName()
Specified by:
getFullName in class Identifier
Returns:
the full qualified name, excluding trailing dot.

getFullAlias

public java.lang.String getFullAlias()
Specified by:
getFullAlias in class Identifier
Returns:
the full qualified alias, excluding trailing dot.

getName

public java.lang.String getName()
Specified by:
getName in class Identifier

getType

public java.lang.String getType()
Specified by:
getType in class Identifier

getModifiers

public int getModifiers()

getFieldIdents

public java.util.List getFieldIdents()

getMethodIdents

public java.util.List getMethodIdents()

getChilds

public java.util.Iterator getChilds()
Specified by:
getChilds in class Identifier

toString

public java.lang.String toString()

getIdentifier

public Identifier getIdentifier(java.lang.String fieldName,
                                java.lang.String typeSig)

containsFieldAliasDirectly

public boolean containsFieldAliasDirectly(java.lang.String fieldName,
                                          java.lang.String typeSig,
                                          IdentifierMatcher matcher)

containsMethodAliasDirectly

public boolean containsMethodAliasDirectly(java.lang.String methodName,
                                           java.lang.String paramType,
                                           IdentifierMatcher matcher)

fieldConflicts

public boolean fieldConflicts(FieldIdentifier field,
                              java.lang.String newAlias)

methodConflicts

public boolean methodConflicts(MethodIdentifier method,
                               java.lang.String newAlias)

conflicting

public boolean conflicting(java.lang.String newAlias)
Specified by:
conflicting in class Identifier

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.