org.mule.impl.endpoint
Class DefaultAnnotationsParserFactory

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

public class DefaultAnnotationsParserFactory
extends Object
implements AnnotationsParserFactory, MuleContextAware

Loads the default endpoint parsers provided by the annotations module. Currently, there is only one, the ReplyAnnotationParser, the others are currently supplied by iBeans.


Field Summary
protected  Log logger
          logger used by this class
protected  MuleContext muleContext
           
 
Constructor Summary
DefaultAnnotationsParserFactory()
           
 
Method Summary
protected  void addDefaultParsers()
           
protected  void addDefaultProcessors()
           
 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.
 ExpressionParser getExpressionParser(Annotation annotation)
          Retrieves a parser for the given annotation, where the annotation is an Expression annotation; one annotated with the Evaluator annotation.
 List<ObjectProcessor> getProcessors()
          A list of Object processors that should be registered for this factory.
 RouterAnnotationParser 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 registerEndpointParser(EndpointAnnotationParser parser)
           
protected  void registerExpressionParser(ExpressionParser parser)
           
protected  void registerObjectProcessor(ObjectProcessor processor)
           
protected  void registerRouterParser(RouterAnnotationParser parser)
           
 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

DefaultAnnotationsParserFactory

public DefaultAnnotationsParserFactory()
Method Detail

setMuleContext

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

addDefaultParsers

protected void addDefaultParsers()

addDefaultProcessors

protected void addDefaultProcessors()

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 ExpressionParser 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 RouterAnnotationParser 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

getProcessors

public List<ObjectProcessor> getProcessors()
Description copied from interface: AnnotationsParserFactory
A list of Object processors that should be registered for this factory. typically, these will be object processors that process annotations on objects that get put ni the registry.

Specified by:
getProcessors in interface AnnotationsParserFactory
Returns:
the list of processors to be used or an empty list.

registerEndpointParser

protected void registerEndpointParser(EndpointAnnotationParser parser)

registerExpressionParser

protected void registerExpressionParser(ExpressionParser parser)

registerRouterParser

protected void registerRouterParser(RouterAnnotationParser parser)

registerObjectProcessor

protected void registerObjectProcessor(ObjectProcessor processor)


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