FieldSelector

Please see the Selectors page for a description of what a selector is and the criteria common to all three types of selector.

A FieldSelector's job is to distinguish between fields. Listed below are the criteria which TypeSelector offers in addition to the criteria common to all selectors.

Type

This criterion directs the inclusion of a field based upon its type.

Example

Matches all fields whose type is serializable (serializableTypes is a reference to a TypeSelector specified elsewhere)

FieldSelector selfReferencingFields {
  fields of type serializableTypes ;
}

Matching Declarer

To satisfy this criterion a field must be of the same type as its declarer. For example in Java source the manager field in this class matches its declarer:

class Person {
  Person manager;
}

This is useful for recognizing compositional patterns.
Example

Matches any field whose type is the same as the class or interface in which it is declared

FieldSelector selfReferencingFields {
  fields matching declarer ;
}