com.googlecode.androidannotations.processing.rest
Class MethodProcessor

java.lang.Object
  extended by com.googlecode.androidannotations.processing.rest.MethodProcessor
All Implemented Interfaces:
HasTarget, DecoratingElementProcessor
Direct Known Subclasses:
DeleteProcessor, GetProcessor, HeadProcessor, OptionsProcessor, PostProcessor, PutProcessor

public abstract class MethodProcessor
extends Object
implements DecoratingElementProcessor


Field Summary
protected  RestAnnotationHelper restAnnotationHelper
           
protected  RestImplementationsHolder restImplementationsHolder
           
 
Constructor Summary
MethodProcessor(ProcessingEnvironment processingEnv, RestImplementationsHolder restImplementationHolder)
           
 
Method Summary
protected abstract  com.sun.codemodel.JInvocation addHttpEntityVar(com.sun.codemodel.JInvocation restCall, MethodProcessorHolder methodHolder)
           
protected abstract  com.sun.codemodel.JVar addHttpHeadersVar(com.sun.codemodel.JBlock body, ExecutableElement executableElement)
           
protected abstract  com.sun.codemodel.JInvocation addResponseEntityArg(com.sun.codemodel.JInvocation restCall, MethodProcessorHolder methodHolder)
           
protected abstract  com.sun.codemodel.JInvocation addResultCallMethod(com.sun.codemodel.JInvocation restCall, MethodProcessorHolder methodHolder)
           
protected  com.sun.codemodel.JVar generateHttpEntityVar(MethodProcessorHolder methodHolder)
           
protected  com.sun.codemodel.JVar generateHttpHeadersVar(EBeanHolder holder, com.sun.codemodel.JBlock body, ExecutableElement executableElement)
           
protected  void generateRestTemplateCallBlock(MethodProcessorHolder methodHolder)
           
abstract  Class<? extends Annotation> getTarget()
           
abstract  void process(Element element, com.sun.codemodel.JCodeModel codeModel, EBeanHolder eBeanHolder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

restImplementationsHolder

protected final RestImplementationsHolder restImplementationsHolder

restAnnotationHelper

protected final RestAnnotationHelper restAnnotationHelper
Constructor Detail

MethodProcessor

public MethodProcessor(ProcessingEnvironment processingEnv,
                       RestImplementationsHolder restImplementationHolder)
Method Detail

generateRestTemplateCallBlock

protected void generateRestTemplateCallBlock(MethodProcessorHolder methodHolder)

addHttpEntityVar

protected abstract com.sun.codemodel.JInvocation addHttpEntityVar(com.sun.codemodel.JInvocation restCall,
                                                                  MethodProcessorHolder methodHolder)

addResponseEntityArg

protected abstract com.sun.codemodel.JInvocation addResponseEntityArg(com.sun.codemodel.JInvocation restCall,
                                                                      MethodProcessorHolder methodHolder)

addResultCallMethod

protected abstract com.sun.codemodel.JInvocation addResultCallMethod(com.sun.codemodel.JInvocation restCall,
                                                                     MethodProcessorHolder methodHolder)

generateHttpEntityVar

protected com.sun.codemodel.JVar generateHttpEntityVar(MethodProcessorHolder methodHolder)

generateHttpHeadersVar

protected com.sun.codemodel.JVar generateHttpHeadersVar(EBeanHolder holder,
                                                        com.sun.codemodel.JBlock body,
                                                        ExecutableElement executableElement)

addHttpHeadersVar

protected abstract com.sun.codemodel.JVar addHttpHeadersVar(com.sun.codemodel.JBlock body,
                                                            ExecutableElement executableElement)

getTarget

public abstract Class<? extends Annotation> getTarget()
Specified by:
getTarget in interface HasTarget

process

public abstract void process(Element element,
                             com.sun.codemodel.JCodeModel codeModel,
                             EBeanHolder eBeanHolder)
                      throws Exception
Specified by:
process in interface DecoratingElementProcessor
Throws:
Exception


Copyright © 2010-2013. All Rights Reserved.