xdoclet
Class Accept

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
              |
              +--xdoclet.beans.BeanContextSupportEx
                    |
                    +--xdoclet.Accept
All Implemented Interfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Collection, DesignMode, EventListener, Predicate, PropertyChangeListener, Serializable, VetoableChangeListener, Visibility

public class Accept
extends BeanContextSupportEx
implements Predicate

Accept is an aggregator of predicates used to filter out certain classes.

Version:
$Revision: 1.6 $
Author:
Aslak Hellesøy
See Also:
Predicate, PredicateFactory, Serialized Form

Field Summary
 
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
 
Constructor Summary
Accept()
           
 
Method Summary
 Object createElement(String predicateType)
          This method is here so that the predicate can be set from Ant.
 boolean evaluate(Object o)
          Evaluates the predicate.
 void setPredicate(Predicate predicate)
          Sets the predicate to use.
 
Methods inherited from class xdoclet.beans.BeanContextSupportEx
add, createInvocations, getInvocations, getParent, setParent
 
Methods inherited from class java.beans.beancontext.BeanContextSupport
addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, bcsPreDeserializationHook, bcsPreSerializationHook, childDeserializedHook, childJustAddedHook, childJustRemovedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, createBCSChild, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, initialize, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

Accept

public Accept()
Method Detail

createElement

public Object createElement(String predicateType)
                     throws XDocletException
This method is here so that the predicate can be set from Ant.

Parameters:
predicateType - the name of the predicate to add.
Returns:
a Predicate
Throws:
XDocletException - if there is no registered Predicate class for the predicateType

setPredicate

public void setPredicate(Predicate predicate)
Sets the predicate to use.

Parameters:
predicate - the predicate to use.

evaluate

public boolean evaluate(Object o)
Evaluates the predicate.

Specified by:
evaluate in interface Predicate
Returns:
true if the predicate evaluates to true.
See Also:
setPredicate(org.apache.commons.collections.Predicate)


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.