if (adaptableObject instanceof DomainWrapper) {
DomainWrapper domain = (DomainWrapper) adaptableObject;
return new DomainPropertySourceAdapter(domain.getName());
}
if (adaptableObject instanceof MBeanInfoWrapper) {
MBeanInfoWrapper wrapper = (MBeanInfoWrapper) adaptableObject;
return new MBeanInfoPropertySourceAdapter(wrapper.getObjectName(),
wrapper.getMBeanInfo());
}
if (adaptableObject instanceof MBeanAttributeInfoWrapper) {
MBeanAttributeInfoWrapper wrapper = (MBeanAttributeInfoWrapper) adaptableObject;
return new MBeanAttributeInfoPropertySourceAdapter(wrapper
.getMBeanAttributeInfo(), wrapper.getObjectName(), wrapper
.getMBeanServerConnection());
}
if (adaptableObject instanceof MBeanOperationInfoWrapper) {
MBeanOperationInfoWrapper wrapper = (MBeanOperationInfoWrapper) adaptableObject;
return new MBeanOperationInfoPropertySourceAdapter(wrapper
.getMBeanOperationInfo());
}
return null;
}