@Override
public Element getHandlerInfo() {
Element root = super.getHandlerInfo();
if (propertyHandler.getInstanceManager() instanceof ApamInstanceManager) {
ApamInstanceManager instance = (ApamInstanceManager) propertyHandler.getInstanceManager();
for (PropertyDefinition definition : instance.getFactory().getDeclaration().getPropertyDefinitions()) {
/*
* Ignore non injected properties
*/
if (definition.getField() == null && definition.getCallback() == null)
continue;
String name = definition.getName();
String field = definition.getField();
String method = definition.getCallback();
String value = instance.getApamComponent() != null ? instance.getApamComponent().getProperty(name) : null;
Element property = new Element("property", ApamComponentFactory.APAM_NAMESPACE);
property.addAttribute(new Attribute("name", ApamComponentFactory.APAM_NAMESPACE, name));
property.addAttribute(new Attribute("field", ApamComponentFactory.APAM_NAMESPACE, field != null ? field : ""));