org.apache.james.jspf.impl
Class DefaultTermDefinition

java.lang.Object
  extended by org.apache.james.jspf.impl.DefaultTermDefinition
All Implemented Interfaces:
TermDefinition

public class DefaultTermDefinition
extends Object
implements 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
DefaultTermDefinition(Class<?> tClass)
           
 
Method Summary
 int getMatchSize()
          Return the number of groups to be expected from the pattern of this Term.
 Pattern getPattern()
          Retrieve the pattern to be used to match a string against this record type.
 Class<?> getTermDef()
          The class implementing this Term type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTermDefinition

public DefaultTermDefinition(Class<?> tClass)
                      throws IllegalArgumentException,
                             SecurityException,
                             IllegalAccessException,
                             NoSuchFieldException
Throws:
IllegalArgumentException
SecurityException
IllegalAccessException
NoSuchFieldException
Method Detail

getPattern

public Pattern getPattern()
Description copied from interface: TermDefinition
Retrieve the pattern to be used to match a string against this record type.

Specified by:
getPattern in interface TermDefinition
Returns:
the pattern for this term
See Also:
TermDefinition.getPattern()

getTermDef

public Class<?> getTermDef()
Description copied from interface: TermDefinition
The class implementing this Term type.

Specified by:
getTermDef in interface TermDefinition
Returns:
the class object.
See Also:
TermDefinition.getTermDef()

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 interface TermDefinition
Returns:
the number of groups
See Also:
TermDefinition.getMatchSize()


Copyright © 2006-2011 The Apache Software Foundation. All Rights Reserved.