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


Field Summary
 
Fields inherited from class com.googlecode.androidannotations.helper.AnnotationHelper
processingEnv
 
Constructor Summary
TargetAnnotationHelper(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.Class<? extends java.lang.annotation.Annotation> target)
           
 
Method Summary
 java.lang.String actionName()
           
 java.lang.String annotationName()
           
static java.lang.String annotationName(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
           
<T> T
extractAnnotationValue(javax.lang.model.element.Element element)
           
 java.lang.Class<? extends java.lang.annotation.Annotation> getTarget()
           
 void printAnnotationError(javax.lang.model.element.Element annotatedElement, java.lang.String message)
           
 void printAnnotationWarning(javax.lang.model.element.Element annotatedElement, java.lang.String message)
           
 
Methods inherited from class com.googlecode.androidannotations.helper.AnnotationHelper
findAnnotationMirror, getElementUtils, getTypeUtils, isAbstract, isAnnotation, isFinal, isInterface, isPrivate, isSubtype, isSubtype, isSynchronized, 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(javax.annotation.processing.ProcessingEnvironment processingEnv,
                              java.lang.Class<? extends java.lang.annotation.Annotation> target)
Method Detail

extractAnnotationValue

public <T> T extractAnnotationValue(javax.lang.model.element.Element element)

getTarget

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

actionName

public java.lang.String actionName()

annotationName

public static java.lang.String annotationName(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)

annotationName

public java.lang.String annotationName()

printAnnotationError

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

printAnnotationWarning

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


Copyright © 2010-2012. All Rights Reserved.