org.androidannotations.handler
Class AbstractListenerHandler

java.lang.Object
  extended by org.androidannotations.handler.BaseAnnotationHandler<EComponentWithViewSupportHolder>
      extended by org.androidannotations.handler.AbstractListenerHandler
All Implemented Interfaces:
AnnotationHandler<EComponentWithViewSupportHolder>
Direct Known Subclasses:
CheckedChangeHandler, ClickHandler, FocusChangeHandler, ItemClickHandler, ItemLongClickHandler, ItemSelectHandler, LongClickHandler, TouchHandler

public abstract class AbstractListenerHandler
extends BaseAnnotationHandler<EComponentWithViewSupportHolder>


Field Summary
 
Fields inherited from class org.androidannotations.handler.BaseAnnotationHandler
androidManifest, androidSystemServices, processHolder, processingEnv, rClass, validatedModel, validatorHelper
 
Constructor Summary
AbstractListenerHandler(Class<?> targetClass, ProcessingEnvironment processingEnvironment)
           
AbstractListenerHandler(String target, ProcessingEnvironment processingEnvironment)
           
 
Method Summary
protected abstract  com.sun.codemodel.JMethod createListenerMethod(com.sun.codemodel.JDefinedClass listenerAnonymousClass)
           
protected  EComponentWithViewSupportHolder getHolder()
           
protected abstract  com.sun.codemodel.JClass getListenerClass()
           
protected  String getMethodName()
           
protected abstract  String getSetterName()
           
protected  com.sun.codemodel.JType getViewClass()
           
protected abstract  void makeCall(com.sun.codemodel.JBlock listenerMethodBody, com.sun.codemodel.JInvocation call, TypeMirror returnType)
           
 void process(Element element, EComponentWithViewSupportHolder holder)
           
protected abstract  void processParameters(com.sun.codemodel.JMethod listenerMethod, com.sun.codemodel.JInvocation call, List<? extends VariableElement> userParameters)
           
 void setAndroidEnvironment(IRClass rClass, AndroidSystemServices androidSystemServices, AndroidManifest androidManifest)
           
 void validate(Element element, AnnotationElements validatedElements, IsValid valid)
           
 
Methods inherited from class org.androidannotations.handler.BaseAnnotationHandler
classes, codeModel, generateApiClass, getTarget, processingEnvironment, refClass, refClass, setProcessHolder, setValidatedModel, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractListenerHandler

public AbstractListenerHandler(Class<?> targetClass,
                               ProcessingEnvironment processingEnvironment)

AbstractListenerHandler

public AbstractListenerHandler(String target,
                               ProcessingEnvironment processingEnvironment)
Method Detail

setAndroidEnvironment

public void setAndroidEnvironment(IRClass rClass,
                                  AndroidSystemServices androidSystemServices,
                                  AndroidManifest androidManifest)
Specified by:
setAndroidEnvironment in interface AnnotationHandler<EComponentWithViewSupportHolder>
Overrides:
setAndroidEnvironment in class BaseAnnotationHandler<EComponentWithViewSupportHolder>

validate

public void validate(Element element,
                     AnnotationElements validatedElements,
                     IsValid valid)
Specified by:
validate in class BaseAnnotationHandler<EComponentWithViewSupportHolder>

process

public void process(Element element,
                    EComponentWithViewSupportHolder holder)

makeCall

protected abstract void makeCall(com.sun.codemodel.JBlock listenerMethodBody,
                                 com.sun.codemodel.JInvocation call,
                                 TypeMirror returnType)

processParameters

protected abstract void processParameters(com.sun.codemodel.JMethod listenerMethod,
                                          com.sun.codemodel.JInvocation call,
                                          List<? extends VariableElement> userParameters)

createListenerMethod

protected abstract com.sun.codemodel.JMethod createListenerMethod(com.sun.codemodel.JDefinedClass listenerAnonymousClass)

getSetterName

protected abstract String getSetterName()

getListenerClass

protected abstract com.sun.codemodel.JClass getListenerClass()

getViewClass

protected com.sun.codemodel.JType getViewClass()

getMethodName

protected String getMethodName()

getHolder

protected final EComponentWithViewSupportHolder getHolder()


Copyright © 2010-2014. All Rights Reserved.