Attribute attr = (Attribute)service.getDefaultAttributeValue(Destination.class); // attr == null if the attribute is not supported if (attr != null) { String attrName = attr.getName(); // Get string representation of default value String attrValue = attr.toString(); process(service, attrName, attrValue); }