/** * Returns a map of default values of attributes associated with this bindable. A * shortcut for: * <pre> * for (AttributeDescriptor d : only(Input.class).flatten().attributeDescriptors.values()) * { * if (d.defaultValue != null || d.requiredAttribute) * values.put(d.key, d.defaultValue); * } * </pre> */ public HashMap<String, Object> getDefaultValues() { final HashMap<String, Object> values = new HashMap<>(); for (AttributeDescriptor d : only(Input.class).flatten().attributeDescriptors.values()) { if (d.defaultValue != null || d.requiredAttribute) { values.put(d.key, d.defaultValue); } } return values; }