private final RequireInterface requireInterfaceAnnotation;
private final String attributeType;
- public static final Set<Class<?>> PERMITTED_PARAMETER_TYPES_FOR_DEPENDENCY_SETTER = new HashSet<>();
+ protected static final Set<Class<?>> PERMITTED_PARAMETER_TYPES_FOR_DEPENDENCY_SETTER = new HashSet<>();
static {
PERMITTED_PARAMETER_TYPES_FOR_DEPENDENCY_SETTER.add(ObjectName.class);
}
public MBeanAttributeInfo toMBeanAttributeInfo() {
- MBeanAttributeInfo info = new MBeanAttributeInfo(name, attributeType,
+ return new MBeanAttributeInfo(name, attributeType,
description, true, true, false);
- return info;
}
/**
// only allow setX(ObjectName y) or setX(ObjectName[] y) or setX(List<ObjectName> y) to continue
- if (setter.getParameterTypes().length > 1) {
- return null;
- }
- if (PERMITTED_PARAMETER_TYPES_FOR_DEPENDENCY_SETTER.contains(setter.getParameterTypes()[0]) == false) {
+ if (setter.getParameterTypes().length > 1 ||
+ !PERMITTED_PARAMETER_TYPES_FOR_DEPENDENCY_SETTER.contains(setter.getParameterTypes()[0])) {
return null;
}
.findMethodAnnotationInSuperClassesAndIfcs(setter, RequireInterface.class, inspectedInterfaces);
// make sure the list if not empty contains always annotation with same
// value
- Set<Class<?>> foundValues = new HashSet<Class<?>>();
+ Set<Class<?>> foundValues = new HashSet<>();
for (RequireInterface ri : foundRequireInterfaces) {
foundValues.add(ri.value());
}