Package org.apache.james.jspf.impl
Class DefaultTermDefinition
java.lang.Object
org.apache.james.jspf.impl.DefaultTermDefinition
- All Implemented Interfaces:
TermDefinition
Default implementation for the TermDefinition.
This implementation try to retrieve the definition looking up a
static REGEX field in the term class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Return the number of groups to be expected from the pattern of this Term.Retrieve the pattern to be used to match a string against this record type.Class
<?> The class implementing this Term type.
-
Constructor Details
-
DefaultTermDefinition
public DefaultTermDefinition(Class<?> tClass) throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException
-
-
Method Details
-
getPattern
Description copied from interface:TermDefinition
Retrieve the pattern to be used to match a string against this record type.- Specified by:
getPattern
in interfaceTermDefinition
- Returns:
- the pattern for this term
- See Also:
-
getTermDef
Description copied from interface:TermDefinition
The class implementing this Term type.- Specified by:
getTermDef
in interfaceTermDefinition
- Returns:
- the class object.
- See Also:
-
getMatchSize
public int getMatchSize()Description copied from interface:TermDefinition
Return the number of groups to be expected from the pattern of this Term.- Specified by:
getMatchSize
in interfaceTermDefinition
- Returns:
- the number of groups
- See Also:
-