/** * Using the BehaviorProvider that is registered for a specific namespace uri and attribute name * that is supplied (as a DynamicAttributeKey object), this method creates a new instance of the * TagBehavior and returns it. This method is called internally while template parsing occurs. * * @param key The attribute key which identifies the attribute with the namespace uri and attribute name. * @param attributes Other attributes of the tag that has this dynamic attribute. * @param line Line number of the tag attribute that is initiating this behavior * @param col Column number of the tag attribute that is initiating this behavior * @return Returns an instance of TagBehavior for the matching behavior implementation. * @throws BehaviorInstantiationException * @throws ExpressionParsingException */ public TagBehavior getBehavior(DynamicAttributeKey key, Map<AttributeKey, Attribute> attributes, int line, int col) throws BehaviorInstantiationException, ExpressionParsingException { BehaviorProvider<? extends TagBehavior> provider = providers.get(key); if (provider != null) { return provider.get((DynamicAttribute) attributes.get(key.toAttributeKey()), attributes, line, col); } return null; }