The class properties dialog allows the setting of obfuscation options on a per-class basis.
The controls are as outlined below:
See the section on Controlling Class Renaming for more details.
Class Access Level | Action |
unspecified | Obfuscate access level setting defaults to the package class access level setting or global obfuscate access level setting if the package setting is not specified. |
public | This class will have it's name obfuscated. |
package |
If the class is declared with default (package) access or private access it's name is obfuscated. All public class names are preserved |
private | This classes name is obfuscated only if it is declared private. If the class is default (package) or public access it's name is preserved. |
none |
This class will never have it's name obfuscated |
Obfuscate Access Level | Action |
unspecified | Obfuscate access level setting defaults to the global obfuscate access level setting. |
public | All symbols are eligible to be obfuscated. |
package | This setting can be used to preserve the public API for a class library. The public and protected symbols are preserved. All private and package symbols are eligible to be obfuscated. |
private | Only the private symbols are obfuscated, the remaining symbols are preserved. |
none | No symbols are obfuscated all symbols are preserved. |
The 'Java Bean Settings' control sets what classes JCloak will recognize as Java Bean's and how JCloak will preserve the bean methods and classes these Bean's define and use.
JCloak can recognize and use BeanInfo classes to automatically exclude classes and methods that a Bean want's to expose publicly. JCloak can also introspect a class to determine the Bean methods and preserve them.
Bean controls can also be set on a per-package or per-class basis. Per class settings override per package settings which override default global settings.
JCloak puts attributes in the manifest of the output Jar file to indicate each Bean.
The following settings and actions are defined:
Java Bean Setting
|
Action
|
unspecified | Setting defaults to the global setting. |
none
|
JCloak does not preserve any Java Bean classes methods. |
beaninfo | JCloak recognizes only classes as Java Beans that have an associated BeanInfo class. Only the methods and classes specified explicitly in the BeanInfo class are preserved. |
introspec | JCloak recognizes only classes as Java Beans that have an associated BeanInfo class. JCloak introspects the Java Bean to determine the methods and classes to preserve, thus all classes and methods that match Bean design patterns are preserved. |
all | JCloak recognizes all classes as Java Beans. JCloak introspects each class to determine the methods and classes to preserve, thus all classes and methods that match Bean design patterns are preserved. |
Preserve Serialized Setting | Action |
unspecified | Do not override the global settings specified or defaulted for PreserveSerialized. |
obfuscate | Obfuscate Serializable classes just like any other class. This is the default setting. |
preserve | Preserve the class name and serialized field names for any class that is Serializable (implements java.io.Serializable or extends a class that does). If the class does not define the field serialVersionUID, add the field and set the initial value of the field to the compatible stream id for the class (this is the same value that would be generated by running 'serialver' on the unobfuscated class). |