org.mule.config
Interface AnnotationsParserFactory

All Known Implementing Classes:
RegistryBackedAnnotationsParserFactory

public interface AnnotationsParserFactory

Defines a common interface to find all Endpoint annotation parsers for a context. Endpoint parsers may be customized depending on the underlying platform. This is not an interface that users should ever need to use or customize, but Mule on different platforms can customize how the endpoints are created from the annotations.

There are 3 types of annotation parser - 1. Endpoint : translates into an endpoint configured on a service object. 2. Router : translates into a router that will be configured on a service object, i.e. WireTap, Splitter, or Filter 3. Expression : translates into an expression, usually these are configured on method parameters so that an expression will get evaluated on the parameter before being passed into the method.

Since:
3.0

Method Summary
 EndpointAnnotationParser getEndpointParser(Annotation annotation, Class<?> aClass, Member member)
          Retrieves a parser for the given annotation, the parameters passed in can be used to validate the use of the annotation, i.e.
 ExpressionAnnotationParser getExpressionParser(Annotation annotation)
          Retrieves a parser for the given annotation, where the annotation is an Expression annotation; one annotated with the Evaluator annotation.
 MessageProcessorAnnotationParser getRouterParser(Annotation annotation, Class<?> aClass, Member member)
          Retrieves a parser for the given annotation, where the annotation is a Router annotation; one annotated with the Router annotation.
 

Method Detail

getEndpointParser

EndpointAnnotationParser getEndpointParser(Annotation annotation,
                                           Class<?> aClass,
                                           Member member)
Retrieves a parser for the given annotation, the parameters passed in can be used to validate the use of the annotation, i.e. you may want to restrict annotations to only be configured on concrete classes

Parameters:
annotation - the annotation being processed
aClass - the class on which the annotation is defined
member - the class member on which the annotation was defined, such as Field, Method, Constructor, or null if a Type-level annotation.
Returns:
the endpoint annotation parser that can parse the supplied annotation or null if a matching parser not found

getExpressionParser

ExpressionAnnotationParser getExpressionParser(Annotation annotation)
Retrieves a parser for the given annotation, where the annotation is an Expression annotation; one annotated with the Evaluator annotation.

Parameters:
annotation - the annotation being processed
Returns:
the expression annotation parser that can parse the supplied annotation or null if a matching parser not found

getRouterParser

MessageProcessorAnnotationParser getRouterParser(Annotation annotation,
                                                 Class<?> aClass,
                                                 Member member)
Retrieves a parser for the given annotation, where the annotation is a Router annotation; one annotated with the Router annotation. the parameters passed in can be used to validate the use of the annotation, i.e. you may want to restrict annotations to only be configured on concrete classes.

Parameters:
annotation - the annotation being processed
aClass - the class on which the annotation is defined
member - the class member on which the annotation was defined, such as Field, Method, Constructor, or null if a Type-level annotation.
Returns:
the router annotation parser that can parse the supplied annotation or null if a matching parser not found


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.