org.mule.config.endpoint
Class RegistryBackedAnnotationsParserFactory

java.lang.Object
  extended by org.mule.config.endpoint.RegistryBackedAnnotationsParserFactory
All Implemented Interfaces:
MuleContextAware, AnnotationsParserFactory

public class RegistryBackedAnnotationsParserFactory
extends Object
implements AnnotationsParserFactory, MuleContextAware

Loads the default expression, router and endpoint parsers provided by Mule. Mule modules can add to these by registering the additional parsers in the 'registry-bootstrap.properties' for custom module.


Field Summary
protected  Log logger
          logger used by this class
protected  MuleContext muleContext
           
 
Constructor Summary
RegistryBackedAnnotationsParserFactory()
           
 
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.
protected  void registerObjectProcessor(ObjectProcessor processor)
           
 void setMuleContext(MuleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger
logger used by this class


muleContext

protected MuleContext muleContext
Constructor Detail

RegistryBackedAnnotationsParserFactory

public RegistryBackedAnnotationsParserFactory()
Method Detail

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware

getEndpointParser

public EndpointAnnotationParser getEndpointParser(Annotation annotation,
                                                  Class aClass,
                                                  Member member)
Description copied from interface: AnnotationsParserFactory
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

Specified by:
getEndpointParser in interface AnnotationsParserFactory
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

public ExpressionAnnotationParser getExpressionParser(Annotation annotation)
Description copied from interface: AnnotationsParserFactory
Retrieves a parser for the given annotation, where the annotation is an Expression annotation; one annotated with the Evaluator annotation.

Specified by:
getExpressionParser in interface AnnotationsParserFactory
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

public MessageProcessorAnnotationParser getRouterParser(Annotation annotation,
                                                        Class aClass,
                                                        Member member)
Description copied from interface: AnnotationsParserFactory
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.

Specified by:
getRouterParser in interface AnnotationsParserFactory
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

registerObjectProcessor

protected void registerObjectProcessor(ObjectProcessor processor)


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