@Override
public void visitField(Field field, JavaImplementation type) throws IntrospectionException {
// Check if a field that is not an SCA reference has any policySet/intent annotations
JavaElementImpl element = new JavaElementImpl(field);
if (!type.getReferenceMembers().values().contains(element)) {
PolicySubject subject = assemblyFactory.createComponent();
readPolicySetAndIntents(subject, field);
if (subject.getPolicySets().isEmpty() && subject.getRequiredIntents().isEmpty()) {
return;
}
throw new ServiceRuntimeException(
"[JCA70002,JCA70005] Field that is not an SCA reference cannot have policySet/intent annotations: " + field);
}