org.apache.camel.component.bean
Class XPathAnnotationExpressionFactory

java.lang.Object
  extended by org.apache.camel.component.bean.DefaultAnnotationExpressionFactory
      extended by org.apache.camel.component.bean.XPathAnnotationExpressionFactory
All Implemented Interfaces:
AnnotationExpressionFactory

public class XPathAnnotationExpressionFactory
extends DefaultAnnotationExpressionFactory

Factory for the XPath expression annotations.

Version:

Constructor Summary
XPathAnnotationExpressionFactory()
           
 
Method Summary
 Expression createExpression(CamelContext camelContext, Annotation annotation, LanguageAnnotation languageAnnotation, Class<?> expressionReturnType)
           
protected  NamespacePrefix[] getExpressionNameSpacePrefix(Annotation annotation)
           
protected  String getHeaderName(Annotation annotation)
          Extracts the value of the header method in the Annotation.
protected  Class<?> getResultType(Annotation annotation)
           
 
Methods inherited from class org.apache.camel.component.bean.DefaultAnnotationExpressionFactory
getAnnotationObjectValue, getExpressionFromAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathAnnotationExpressionFactory

public XPathAnnotationExpressionFactory()
Method Detail

createExpression

public Expression createExpression(CamelContext camelContext,
                                   Annotation annotation,
                                   LanguageAnnotation languageAnnotation,
                                   Class<?> expressionReturnType)
Specified by:
createExpression in interface AnnotationExpressionFactory
Overrides:
createExpression in class DefaultAnnotationExpressionFactory

getResultType

protected Class<?> getResultType(Annotation annotation)

getExpressionNameSpacePrefix

protected NamespacePrefix[] getExpressionNameSpacePrefix(Annotation annotation)

getHeaderName

protected String getHeaderName(Annotation annotation)
Extracts the value of the header method in the Annotation. For backwards compatibility this method will return null if the annotation's method is not found.

Returns:
If the annotation has the method 'header' then the name of the header we want to apply the XPath expression to. Otherwise null will be returned


Apache Camel