xdoclet.util.predicates
Class ReflectionPredicate

java.lang.Object
  |
  +--xjavadoc.predicates.ProgramElementPredicate
        |
        +--xdoclet.util.predicates.ReflectionPredicate
All Implemented Interfaces:
Predicate

public class ReflectionPredicate
extends ProgramElementPredicate

Predicate that uses reflection to call a no-argument method that returns a boolean. This is so we don't have to write one Predicate for all the different isXxx() methods in the XJavaDoc API.

Version:
$Revision: 1.5 $
Author:
Aslak Hellesøy

Constructor Summary
ReflectionPredicate(String methodName)
          Constructs a new ReflectionPredicate.
 
Method Summary
protected  boolean evaluate(XProgramElement programElement)
           
 void setMethodName(String methodName)
          Sets the method name.
 String toString()
           
 
Methods inherited from class xjavadoc.predicates.ProgramElementPredicate
evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectionPredicate

public ReflectionPredicate(String methodName)
Constructs a new ReflectionPredicate.

Parameters:
methodName - the method name to evaluate
Method Detail

evaluate

protected boolean evaluate(XProgramElement programElement)
Specified by:
evaluate in class ProgramElementPredicate

setMethodName

public void setMethodName(String methodName)
Sets the method name. Sets negation if methodName starts with !.

Parameters:
methodName - the method name

toString

public String toString()
Overrides:
toString in class Object


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