Code example for Annotation

Methods: annotationType

0
 */ 
public class XPathAnnotationParser implements ExpressionParser 
{ 
    public ExpressionArgument parse(Annotation annotation, Class parameterType)
    { 
        Evaluator evaluator = annotation.annotationType().getAnnotation(Evaluator.class);
        String eval = "xpath";
        if (evaluator != null)
        { 
            if (parameterType.equals(Node.class) || parameterType.equals(org.dom4j.Node.class) ||
                    parameterType.equals(Element.class) || parameterType.equals(org.dom4j.Element.class) ||
                    parameterType.equals(Document.class) || parameterType.equals(org.dom4j.Document.class))
            { 
                eval = "xpath-node";
            } 
            ExpressionArgument arg = new ExpressionArgument(null, new ExpressionConfig(((XPath) annotation).value(),
                    eval, null), ((XPath) annotation).required(), parameterType);
            return arg;
        } 
        else 
        {