com.googlecode.androidannotations.helper
Class TargetAnnotationHelper

java.lang.Object
  extended by com.googlecode.androidannotations.helper.AnnotationHelper
      extended by com.googlecode.androidannotations.helper.TargetAnnotationHelper
All Implemented Interfaces:
HasTarget
Direct Known Subclasses:
IdAnnotationHelper, RestAnnotationHelper

public class TargetAnnotationHelper
extends AnnotationHelper
implements HasTarget


Constructor Summary
TargetAnnotationHelper(ProcessingEnvironment processingEnv, Class<? extends Annotation> target)
           
 
Method Summary
 String actionName()
           
 String annotationName()
           
static String annotationName(Class<? extends Annotation> annotationClass)
           
 DeclaredType extractAnnotationClassParameter(Element element)
           
<T> T
extractAnnotationParameter(Element element, String methodName)
           
<T> T
extractAnnotationValueParameter(Element element)
           
 Class<? extends Annotation> getTarget()
           
 void printAnnotationError(Element annotatedElement, String message)
           
 void printAnnotationWarning(Element annotatedElement, String message)
           
 
Methods inherited from class com.googlecode.androidannotations.helper.AnnotationHelper
actionName, defaultResIdValue, defaultResName, extractAnnotationClassArrayParameter, extractAnnotationClassParameter, extractAnnotationClassParameter, extractAnnotationFieldRefs, extractAnnotationParameter, extractAnnotationResIdValueParameter, extractAnnotationResNameParameter, extractAnnotationResources, extractElementName, findAnnotationMirror, getElementUtils, getTypeUtils, isAbstract, isAnnotation, isFinal, isInterface, isPrivate, isPublic, isSubtype, isSubtype, isSynchronized, isTopLevel, printAnnotationError, printAnnotationMessage, printAnnotationWarning, printError, typeElementFromQualifiedName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetAnnotationHelper

public TargetAnnotationHelper(ProcessingEnvironment processingEnv,
                              Class<? extends Annotation> target)
Method Detail

extractAnnotationValueParameter

public <T> T extractAnnotationValueParameter(Element element)

extractAnnotationParameter

public <T> T extractAnnotationParameter(Element element,
                                        String methodName)

extractAnnotationClassParameter

public DeclaredType extractAnnotationClassParameter(Element element)

getTarget

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

actionName

public String actionName()

annotationName

public static String annotationName(Class<? extends Annotation> annotationClass)

annotationName

public String annotationName()

printAnnotationError

public void printAnnotationError(Element annotatedElement,
                                 String message)
Parameters:
message - if the string contains a %s, it will be replaced with the annotation name (ex: @Override)

printAnnotationWarning

public void printAnnotationWarning(Element annotatedElement,
                                   String message)
Parameters:
message - if the string contains a %s, it will be replaced with the annotation name (ex: @Override)


Copyright © 2010-2013. All Rights Reserved.