if (definition.getLocalAttributeNames() != null) { attributeNames.addAll(definition.getLocalAttributeNames());
if (definition.getLocalAttributeNames() != null) { attributeNames.addAll(definition.getLocalAttributeNames());
if (definition.getLocalAttributeNames() != null) { attributeNames.addAll(definition.getLocalAttributeNames());
/** * Validates a custom definition. * * @param definition The definition to validate. */ private void validate(Definition definition) { Set<String> names = definition.getLocalAttributeNames(); if (names != null) { for (String name : names) { Attribute attribute = definition.getLocalAttribute(name); if (attribute.getValue() == null) { throw new IllegalArgumentException( "Attribute '" + name + "' value not defined"); } } } names = definition.getCascadedAttributeNames(); if (names != null) { for (String name : names) { Attribute attribute = definition.getCascadedAttribute(name); if (attribute.getValue() == null) { throw new IllegalArgumentException( "Attribute '" + name + "' value not defined"); } } } }
/** * Creates a definition given its representation with wildcards. * * @param d The definition to replace. * @param name The name of the definition to be created. * @param vars The variables to be substituted. * @return The definition that can be rendered. * @since 2.1.0 */ protected Definition replaceDefinition(Definition d, String name, Map<Integer, String> vars) { Definition nudef = new Definition(); nudef.setExtends(replace(d.getExtends(), vars)); nudef.setName(name); nudef.setPreparer(replace(d.getPreparer(), vars)); nudef.setTemplateAttribute(replaceVarsInAttribute(d .getTemplateAttribute(), vars)); Set<String> localAttributeNames = d.getLocalAttributeNames(); if (localAttributeNames != null && !localAttributeNames.isEmpty()) { for (String attributeName : localAttributeNames) { Attribute attr = d.getLocalAttribute(attributeName); Attribute nuattr = replaceVarsInAttribute(attr, vars); nudef.putAttribute(replace(attributeName, vars), nuattr); } } return nudef; }
Set<String> attributeNames = d.getLocalAttributeNames(); if (attributeNames != null && !attributeNames.isEmpty()) { for (String attributeName : attributeNames) {