}
int modifiers = method.getModifiers();
org.osoa.sca.annotations.Reference annotation = method.getAnnotation(org.osoa.sca.annotations.Reference.class);
if (annotation != null) {
if (!Modifier.isPublic(modifiers)) {
InvalidSetterException e = new InvalidSetterException("Reference setter method is not public");
e.setIdentifier(method.getName());
throw e;
}
if (!Void.TYPE.equals(method.getReturnType())) {
InvalidSetterException e = new InvalidSetterException("Refence setter method must return void");
e.setIdentifier(method.toString());
throw e;
}
Class<?>[] params = method.getParameterTypes();
if (params.length != 1) {
InvalidSetterException e = new InvalidSetterException("Reference setter method must have one parameter");
e.setIdentifier(method.toString());
throw e;
}
String name = annotation.name();
if (name.length() == 0) {
name = method.getName();