public class ClassFilter extends java.lang.Object implements ObjectFilter
Constructor and Description |
---|
ClassFilter(java.lang.String className,
RuleSession rs)
Creates a new class filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.Object object)
Indicates that the specified object passes the filter if it is
an instance of the class this filter was instantiated with.
|
void |
reset()
Reset has no affect on this filter.
|
public ClassFilter(java.lang.String className, RuleSession rs) throws UndefinedException
className
- the name of the class that the filter should pass
instances of. The class may be an RL class or a Java class.
Consistent with RL semantics, it looks for an RL class with
the specified name first and then looks for a Java class .rs
- the RuleSession this filter will be used with. It is used
to handle RL classes.UndefinedException
public boolean accept(java.lang.Object object)
accept
in interface ObjectFilter
object
- the object to apply the filter to.public void reset()
reset
in interface ObjectFilter