ProGuard

proguard
Class ClassSpecification

java.lang.Object
  extended byproguard.ClassSpecification
All Implemented Interfaces:
Cloneable

public class ClassSpecification
extends Object
implements Cloneable

This class stores a specification of classes and possibly class members. The specification is template-based: the class names and class member names and descriptors can contain wildcards. Classes can be specified explicitly, or as extensions or implementations in the class hierarchy.


Field Summary
 String className
           
 String comments
           
 String extendsClassName
           
 List fieldSpecifications
           
 boolean markClassFiles
           
 boolean markConditionally
           
 List methodSpecifications
           
 int requiredSetAccessFlags
           
 int requiredUnsetAccessFlags
           
 
Constructor Summary
ClassSpecification()
          Creates a new option to keep all possible class(es).
ClassSpecification(int requiredSetAccessFlags, int requiredUnsetAccessFlags, String className, String extendsClassName, boolean markClassFiles, boolean markConditionally)
          Creates a new option to keep the specified class(es).
ClassSpecification(int requiredSetAccessFlags, int requiredUnsetAccessFlags, String className, String extendsClassName, boolean markClassFiles, boolean markConditionally, String comments)
          Creates a new option to keep the specified class(es).
 
Method Summary
 void addField(ClassMemberSpecification fieldSpecification)
          Specifies to keep the specified field(s) of this option's class(es).
 void addMethod(ClassMemberSpecification methodSpecification)
          Specifies to keep the specified method(s) of this option's class(es).
 Object clone()
           
 boolean equals(Object object)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requiredSetAccessFlags

public int requiredSetAccessFlags

requiredUnsetAccessFlags

public int requiredUnsetAccessFlags

className

public String className

extendsClassName

public String extendsClassName

markClassFiles

public boolean markClassFiles

markConditionally

public boolean markConditionally

comments

public String comments

fieldSpecifications

public List fieldSpecifications

methodSpecifications

public List methodSpecifications
Constructor Detail

ClassSpecification

public ClassSpecification()
Creates a new option to keep all possible class(es). The option doesn't have comments.


ClassSpecification

public ClassSpecification(int requiredSetAccessFlags,
                          int requiredUnsetAccessFlags,
                          String className,
                          String extendsClassName,
                          boolean markClassFiles,
                          boolean markConditionally)
Creates a new option to keep the specified class(es). The option doesn't have comments.

Parameters:
requiredSetAccessFlags - the class access flags that must be set in order for the class to apply.
requiredUnsetAccessFlags - the class access flags that must be unset in order for the class to apply.
className - the class name. The name may be null to specify any class, or it may contain "**", "*", or "?" wildcards.
extendsClassName - the name of the class that the class must extend or implement in order to apply. The name may be null to specify any class.
markClassFiles - specifies whether to mark the class files. If false, only class members are marked. If true, the class files are marked as well.
markConditionally - specifies whether to mark the class files and class members conditionally. If true, class files and class members are marked, on the condition that all specified class members are present.

ClassSpecification

public ClassSpecification(int requiredSetAccessFlags,
                          int requiredUnsetAccessFlags,
                          String className,
                          String extendsClassName,
                          boolean markClassFiles,
                          boolean markConditionally,
                          String comments)
Creates a new option to keep the specified class(es).

Parameters:
requiredSetAccessFlags - the class access flags that must be set in order for the class to apply.
requiredUnsetAccessFlags - the class access flags that must be unset in order for the class to apply.
className - the class name. The name may be null to specify any class, or it may contain "**", "*", or "?" wildcards.
extendsClassName - the name of the class that the class must extend or implement in order to apply. The name may be null to specify any class.
markClassFiles - specifies whether to mark the class files. If false, only class members are marked. If true, the class files are marked as well.
markConditionally - specifies whether to mark the class files and class members conditionally. If true, class files and class members are marked, on the condition that all specified class members are present.
comments - provides optional comments on this option.
Method Detail

addField

public void addField(ClassMemberSpecification fieldSpecification)
Specifies to keep the specified field(s) of this option's class(es).

Parameters:
fieldSpecification - the field specification.

addMethod

public void addMethod(ClassMemberSpecification methodSpecification)
Specifies to keep the specified method(s) of this option's class(es).

Parameters:
methodSpecification - the method specification.

equals

public boolean equals(Object object)

hashCode

public int hashCode()

clone

public Object clone()

ProGuard