A fields criterion is declared nested within a field selector.
Attribute | Description | Required |
---|---|---|
Please see selector criterion for additional parameters. | ||
typeSelector | a reference to a type selector. Qualifying fields must be of a type which is accepted by this type selector. Fields of a primitive type are excluded. | No |
matchesDeclarer | flag to indicate that qualifying fields are both of type X and declared within type X. This is useful for identifying design patterns such as singletons. | No |
<FieldSelector name="referencingOwner">Declares a field selector which accepts only fields whose type matches the type in which the field is declared.
<FieldsCriterion matchesDeclarer="true"/>
</FieldSelector>