@Override public <T extends IProcessableElementTag> T setAttribute(final T tag, final String attributeName, final String attributeValue) { if (tag == null) { return null; } if (tag instanceof IOpenElementTag) { return (T) setAttribute((IOpenElementTag)tag, attributeName, attributeValue); } if (tag instanceof IStandaloneElementTag) { return (T) setAttribute((IStandaloneElementTag)tag, attributeName, attributeValue); } throw new TemplateProcessingException("Unknown type of processable element tag: " + tag.getClass().getName()); }
@Override public <T extends IProcessableElementTag> T setAttribute(final T tag, final String attributeName, final String attributeValue, final AttributeValueQuotes attributeValueQuotes) { if (tag == null) { return null; } if (tag instanceof IOpenElementTag) { return (T) setAttribute((IOpenElementTag)tag, attributeName, attributeValue, attributeValueQuotes); } if (tag instanceof IStandaloneElementTag) { return (T) setAttribute((IStandaloneElementTag)tag, attributeName, attributeValue, attributeValueQuotes); } throw new TemplateProcessingException("Unknown type of processable element tag: " + tag.getClass().getName()); }
private IStandaloneElementTag setAttribute(final IStandaloneElementTag standaloneElementTag, final String attributeName, final String attributeValue) { if (!(standaloneElementTag instanceof StandaloneElementTag)) { return setAttribute(StandaloneElementTag.asEngineStandaloneElementTag(standaloneElementTag), attributeName, attributeValue); } return ((StandaloneElementTag) standaloneElementTag).setAttribute(this.attributeDefinitions, null, attributeName, attributeValue, null); }
private IOpenElementTag setAttribute(final IOpenElementTag openElementTag, final String attributeName, final String attributeValue) { if (!(openElementTag instanceof OpenElementTag)) { return setAttribute(OpenElementTag.asEngineOpenElementTag(openElementTag), attributeName, attributeValue); } return ((OpenElementTag) openElementTag).setAttribute(this.attributeDefinitions, null, attributeName, attributeValue, null); }
private IOpenElementTag setAttribute(final IOpenElementTag openElementTag, final String attributeName, final String attributeValue, final AttributeValueQuotes attributeValueQuotes) { if (!(openElementTag instanceof OpenElementTag)) { return setAttribute(OpenElementTag.asEngineOpenElementTag(openElementTag), attributeName, attributeValue, attributeValueQuotes); } return ((OpenElementTag) openElementTag).setAttribute(this.attributeDefinitions, null, attributeName, attributeValue, attributeValueQuotes); }
private IStandaloneElementTag setAttribute(final IStandaloneElementTag standaloneElementTag, final String attributeName, final String attributeValue, final AttributeValueQuotes attributeValueQuotes) { if (!(standaloneElementTag instanceof StandaloneElementTag)) { return setAttribute(StandaloneElementTag.asEngineStandaloneElementTag(standaloneElementTag), attributeName, attributeValue, attributeValueQuotes); } return ((StandaloneElementTag) standaloneElementTag).setAttribute(this.attributeDefinitions, null, attributeName, attributeValue, attributeValueQuotes); }