com.openharbor.beck.configure
Class DefaultPredicate
java.lang.Object
com.openharbor.beck.configure.DefaultPredicate
- All Implemented Interfaces:
- Predicate
- public class DefaultPredicate
- extends java.lang.Object
- implements Predicate
A Predicate that matches selector values to conditions of its configuration.
So, the configuration conditions are interpreted as a crude Boolean expression language.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
BOOLEAN_PROPERTIES
public static final XMLName[] BOOLEAN_PROPERTIES
QNAME_PROPERTIES
public static final XMLName[] QNAME_PROPERTIES
CLASS_PROPERTIES
public static final XMLName[] CLASS_PROPERTIES
conditions
protected java.util.Map conditions
DefaultPredicate
public DefaultPredicate()
configure
public void configure(Unmarshaller parent,
XMLThing source)
- Description copied from interface:
Predicate
- Set configuration parameters.
This method need not be thread-safe.
- Specified by:
configure
in interface Predicate
- Parameters:
parent
- a handle on the When that contains this Predicate.source
- configuration parameters (as XML conditions)
toString
public java.lang.String toString()
evaluate
public boolean evaluate(Configuration.Selector selector)
- Description copied from interface:
Predicate
- Determine whether this predicate is true for the given selector.
This method must be thread-safe; that is, when called concurrently
by multiple threads, the value returned to each thread must be
independent of the threads' order of execution.
This is ordinarily achieved by not modifying any objects.
- Specified by:
evaluate
in interface Predicate
match
protected boolean match(Configuration.MarshalSelector selector)
match
protected boolean match(Configuration.UnmarshalSelector selector)
matchName
protected boolean matchName(java.lang.Object expected,
java.lang.Object actual)
matchAttribute
protected boolean matchAttribute(java.lang.Object expectedKey,
boolean isAttribute,
XMLName actual)
matchElement
protected boolean matchElement(java.lang.Object expectedKey,
boolean isAttribute,
XMLName actual)
matchClass
protected boolean matchClass(java.lang.Object expectedKey,
java.lang.Class actual)
matchClassIsArray
protected boolean matchClassIsArray(java.lang.Class actual)