org.thymeleaf.processor.element.IElementProcessor Maven / Gradle / Ivy
/*
* =============================================================================
*
* Copyright (c) 2011-2018, The THYMELEAF team (http://www.thymeleaf.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* =============================================================================
*/
package org.thymeleaf.processor.element;
import org.thymeleaf.processor.IProcessor;
/**
*
* Base interface for all processors that execute on elements (tags).
*
*
* The elements these processors execute on are defined by the matching element and
* matching attribute, defined by {@link #getMatchingElementName()} and {@link #getMatchingAttributeName()}.
*
*
* Element processors can match an element based on an element name, an attribute name, or both. But it is
* required that at least one option (element or attribute) be specified.
*
*
* Element processors should not directly implement this interface, but instead implement one of
* {@link IElementTagProcessor} or {@link IElementModelProcessor}.
*
*
* @author Daniel Fernández
*
* @see IElementTagProcessor
* @see IElementModelProcessor
* @see MatchingElementName
* @see MatchingAttributeName
*
* @since 3.0.0
*
*/
public interface IElementProcessor extends IProcessor {
/**
*
* Returns the element name that would make this processor match (if any).
*
*
* @return the element name.
*/
public MatchingElementName getMatchingElementName();
/**
*
* Returns the attribute name that would make this processor match (if any).
*
*
* @return the attribute name.
*/
public MatchingAttributeName getMatchingAttributeName();
}