Field Exclude Parameter
|
The Field Exclude Parameter dialog has three facets:
- the specification of the field itself and
- the specification of the class that contains the field and
- the specification of the package that contains the class
For a field to be excluded it must match the full specification.
|
The field itself
In specifying the field whose name is to be excluded, you can specify:
- whether its access level is
- not specifed
- public
- protected
- package (i.e. default)
- private
- whether it has or doesn't have the modifiers
- static
- final
- volatile
- transient
- its name or a "*" wildcard string that its name must match
- the fully qualified name of its type
- the fully qualified class name of an annotation that a matching method must have. You can use the "*" wildcard. Do not include the '@' character.
|
|
The containing class
To specify the containing class, click the Containing class tab.
The dialog basically works the same way as the Class Exclude Parameter dialog.
The difference is that you are now specifying the containing class of the field whose name is to be excluded.
The class Name field cannot be empty but a simple "*" wildcard is acceptable.
If you wish to exclude the containing class name as well as the field name then you should select the
Exclude class name as well box.
|
|
The containing package
To specify the containing package, click the Containing package tab.
The dialog basically works the same way as the Package Exclude Parameter dialog.
The difference is that you are now specifying the package qualifiers of the class containing the field whose name is to be excluded.
If you clear the Name field then you are specifying that the class is in the default package.
If you wish to exclude the containing package name as well as the field name then you should select the
Exclude package name as well box.
|
|
Examples
The specification:
*.* implements java.io.Serializable @pack2.MyAnnotation0 !static !transient *
means exclude all fields that:
- are annotated by a class matching
pack2.MyAnnotation0
- are NOT
static and are NOT transient
- are contained in a class that:
- implements
java.io.Serializable or a subclass of java.io.Serializable
The specification:
public final * extends pack1.Class1 public static final java.lang.String[] f*
means exclude all fields that:
- are
public static final
- are of the type
java.lang.String[]
- have a name that matches
"f*"
- are contained in a class that:
- is
public final
- has a name that matches
"*"
- extends
pack1.Class1
- is contained in the default package
|