com.thoughtworks.qdox.model.annotation
Class EvaluatingVisitor

java.lang.Object
  extended by com.thoughtworks.qdox.model.annotation.EvaluatingVisitor
All Implemented Interfaces:
AnnotationVisitor

public abstract class EvaluatingVisitor
extends Object
implements AnnotationVisitor

Visitor that evaluates annotation expressions.

Users of this class must override getFieldReferenceValue(JavaField) to return values for referenced fields.

Author:
Jochen Kuhnle

Constructor Summary
EvaluatingVisitor()
           
 
Method Summary
protected abstract  Object getFieldReferenceValue(JavaField javaField)
           
 List getListValue(Annotation annotation, String property)
           
 Object getValue(Annotation annotation, String property)
           
protected static Class numericResultType(Object left, Object right)
          Return the numeric result type of a binary operator
protected static Class resultType(Object left, Object right)
          Return the result type of a binary operator
protected static Class unaryNumericResultType(Object value)
          Return the result type of an unary operator
protected static Class unaryResultType(Object value)
           
 Object visitAnnotation(Annotation annotation)
           
 Object visitAnnotationAdd(AnnotationAdd op)
           
 Object visitAnnotationAnd(AnnotationAnd and)
           
 Object visitAnnotationCast(AnnotationCast annotationCast)
           
 Object visitAnnotationConstant(AnnotationConstant constant)
           
 Object visitAnnotationDivide(AnnotationDivide op)
           
 Object visitAnnotationEquals(AnnotationEquals annotationEquals)
           
 Object visitAnnotationExclusiveOr(AnnotationExclusiveOr annotationExclusiveOr)
           
 Object visitAnnotationFieldRef(AnnotationFieldRef fieldRef)
           
 Object visitAnnotationGreaterEquals(AnnotationGreaterEquals greaterEquals)
           
 Object visitAnnotationGreaterThan(AnnotationGreaterThan op)
           
 Object visitAnnotationLessEquals(AnnotationLessEquals lessEquals)
           
 Object visitAnnotationLessThan(AnnotationLessThan op)
           
 Object visitAnnotationLogicalAnd(AnnotationLogicalAnd and)
           
 Object visitAnnotationLogicalNot(AnnotationLogicalNot not)
           
 Object visitAnnotationLogicalOr(AnnotationLogicalOr or)
           
 Object visitAnnotationMinusSign(AnnotationMinusSign sign)
           
 Object visitAnnotationMultiply(AnnotationMultiply op)
           
 Object visitAnnotationNot(AnnotationNot not)
           
 Object visitAnnotationNotEquals(AnnotationNotEquals annotationNotEquals)
           
 Object visitAnnotationOr(AnnotationOr or)
           
 Object visitAnnotationParenExpression(AnnotationParenExpression parenExpression)
           
 Object visitAnnotationPlusSign(AnnotationPlusSign sign)
           
 Object visitAnnotationQuery(AnnotationQuery annotationQuery)
           
 Object visitAnnotationRemainder(AnnotationRemainder remainder)
           
 Object visitAnnotationShiftLeft(AnnotationShiftLeft shiftLeft)
           
 Object visitAnnotationShiftRight(AnnotationShiftRight shiftRight)
           
 Object visitAnnotationSubtract(AnnotationSubtract op)
           
 Object visitAnnotationTypeRef(AnnotationTypeRef typeRef)
           
 Object visitAnnotationUnsignedShiftRight(AnnotationUnsignedShiftRight shiftRight)
           
 Object visitAnnotationValueList(AnnotationValueList valueList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluatingVisitor

public EvaluatingVisitor()
Method Detail

getValue

public Object getValue(Annotation annotation,
                       String property)

getListValue

public List getListValue(Annotation annotation,
                         String property)

resultType

protected static Class resultType(Object left,
                                  Object right)
Return the result type of a binary operator

Performs binary numeric promotion as specified in the Java Language Specification,

See Also:
section 5.6.1

numericResultType

protected static Class numericResultType(Object left,
                                         Object right)
Return the numeric result type of a binary operator

Performs binary numeric promotion as specified in the Java Language Specification,

See Also:
section 5.6.1

unaryNumericResultType

protected static Class unaryNumericResultType(Object value)
Return the result type of an unary operator

Performs unary numeric promotion as specified in the Java Language Specification,

See Also:
section 5.6.2

unaryResultType

protected static Class unaryResultType(Object value)

visitAnnotation

public Object visitAnnotation(Annotation annotation)
Specified by:
visitAnnotation in interface AnnotationVisitor

visitAnnotationAdd

public Object visitAnnotationAdd(AnnotationAdd op)
Specified by:
visitAnnotationAdd in interface AnnotationVisitor

visitAnnotationConstant

public Object visitAnnotationConstant(AnnotationConstant constant)
Specified by:
visitAnnotationConstant in interface AnnotationVisitor

visitAnnotationDivide

public Object visitAnnotationDivide(AnnotationDivide op)
Specified by:
visitAnnotationDivide in interface AnnotationVisitor

visitAnnotationFieldRef

public Object visitAnnotationFieldRef(AnnotationFieldRef fieldRef)
Specified by:
visitAnnotationFieldRef in interface AnnotationVisitor

getFieldReferenceValue

protected abstract Object getFieldReferenceValue(JavaField javaField)

visitAnnotationGreaterThan

public Object visitAnnotationGreaterThan(AnnotationGreaterThan op)
Specified by:
visitAnnotationGreaterThan in interface AnnotationVisitor

visitAnnotationLessThan

public Object visitAnnotationLessThan(AnnotationLessThan op)
Specified by:
visitAnnotationLessThan in interface AnnotationVisitor

visitAnnotationMultiply

public Object visitAnnotationMultiply(AnnotationMultiply op)
Specified by:
visitAnnotationMultiply in interface AnnotationVisitor

visitAnnotationParenExpression

public Object visitAnnotationParenExpression(AnnotationParenExpression parenExpression)
Specified by:
visitAnnotationParenExpression in interface AnnotationVisitor

visitAnnotationSubtract

public Object visitAnnotationSubtract(AnnotationSubtract op)
Specified by:
visitAnnotationSubtract in interface AnnotationVisitor

visitAnnotationTypeRef

public Object visitAnnotationTypeRef(AnnotationTypeRef typeRef)
Specified by:
visitAnnotationTypeRef in interface AnnotationVisitor

visitAnnotationValueList

public Object visitAnnotationValueList(AnnotationValueList valueList)
Specified by:
visitAnnotationValueList in interface AnnotationVisitor

visitAnnotationAnd

public Object visitAnnotationAnd(AnnotationAnd and)
Specified by:
visitAnnotationAnd in interface AnnotationVisitor

visitAnnotationGreaterEquals

public Object visitAnnotationGreaterEquals(AnnotationGreaterEquals greaterEquals)
Specified by:
visitAnnotationGreaterEquals in interface AnnotationVisitor

visitAnnotationLessEquals

public Object visitAnnotationLessEquals(AnnotationLessEquals lessEquals)
Specified by:
visitAnnotationLessEquals in interface AnnotationVisitor

visitAnnotationLogicalAnd

public Object visitAnnotationLogicalAnd(AnnotationLogicalAnd and)
Specified by:
visitAnnotationLogicalAnd in interface AnnotationVisitor

visitAnnotationLogicalNot

public Object visitAnnotationLogicalNot(AnnotationLogicalNot not)
Specified by:
visitAnnotationLogicalNot in interface AnnotationVisitor

visitAnnotationLogicalOr

public Object visitAnnotationLogicalOr(AnnotationLogicalOr or)
Specified by:
visitAnnotationLogicalOr in interface AnnotationVisitor

visitAnnotationMinusSign

public Object visitAnnotationMinusSign(AnnotationMinusSign sign)
Specified by:
visitAnnotationMinusSign in interface AnnotationVisitor

visitAnnotationNot

public Object visitAnnotationNot(AnnotationNot not)
Specified by:
visitAnnotationNot in interface AnnotationVisitor

visitAnnotationOr

public Object visitAnnotationOr(AnnotationOr or)
Specified by:
visitAnnotationOr in interface AnnotationVisitor

visitAnnotationPlusSign

public Object visitAnnotationPlusSign(AnnotationPlusSign sign)
Specified by:
visitAnnotationPlusSign in interface AnnotationVisitor

visitAnnotationRemainder

public Object visitAnnotationRemainder(AnnotationRemainder remainder)
Specified by:
visitAnnotationRemainder in interface AnnotationVisitor

visitAnnotationShiftLeft

public Object visitAnnotationShiftLeft(AnnotationShiftLeft shiftLeft)
Specified by:
visitAnnotationShiftLeft in interface AnnotationVisitor

visitAnnotationShiftRight

public Object visitAnnotationShiftRight(AnnotationShiftRight shiftRight)
Specified by:
visitAnnotationShiftRight in interface AnnotationVisitor

visitAnnotationUnsignedShiftRight

public Object visitAnnotationUnsignedShiftRight(AnnotationUnsignedShiftRight shiftRight)
Specified by:
visitAnnotationUnsignedShiftRight in interface AnnotationVisitor

visitAnnotationEquals

public Object visitAnnotationEquals(AnnotationEquals annotationEquals)
Specified by:
visitAnnotationEquals in interface AnnotationVisitor

visitAnnotationExclusiveOr

public Object visitAnnotationExclusiveOr(AnnotationExclusiveOr annotationExclusiveOr)
Specified by:
visitAnnotationExclusiveOr in interface AnnotationVisitor

visitAnnotationNotEquals

public Object visitAnnotationNotEquals(AnnotationNotEquals annotationNotEquals)
Specified by:
visitAnnotationNotEquals in interface AnnotationVisitor

visitAnnotationQuery

public Object visitAnnotationQuery(AnnotationQuery annotationQuery)
Specified by:
visitAnnotationQuery in interface AnnotationVisitor

visitAnnotationCast

public Object visitAnnotationCast(AnnotationCast annotationCast)
Specified by:
visitAnnotationCast in interface AnnotationVisitor


Copyright © 2002-2011. All Rights Reserved.