com.thoughtworks.qdox.model.annotation

Class EvaluatingVisitor

Implemented Interfaces:
AnnotationVisitor

public abstract class EvaluatingVisitor
extends java.lang.Object
implements AnnotationVisitor

Visitor that evaluates annotation expressions.

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

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

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

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,

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,

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)

Method Details

getFieldReferenceValue

protected abstract Object getFieldReferenceValue(JavaField javaField)

getListValue

public List getListValue(Annotation annotation,
                         String property)

getValue

public Object getValue(Annotation annotation,
                       String property)

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,


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,


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,


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

visitAnnotationAnd

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

visitAnnotationCast

public Object visitAnnotationCast(AnnotationCast annotationCast)
Specified by:
visitAnnotationCast 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

visitAnnotationEquals

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

visitAnnotationExclusiveOr

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

visitAnnotationFieldRef

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

visitAnnotationGreaterEquals

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

visitAnnotationGreaterThan

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

visitAnnotationLessEquals

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

visitAnnotationLessThan

public Object visitAnnotationLessThan(AnnotationLessThan op)
Specified by:
visitAnnotationLessThan 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

visitAnnotationMultiply

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

visitAnnotationNot

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

visitAnnotationNotEquals

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

visitAnnotationOr

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

visitAnnotationParenExpression

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

visitAnnotationPlusSign

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

visitAnnotationQuery

public Object visitAnnotationQuery(AnnotationQuery annotationQuery)
Specified by:
visitAnnotationQuery 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

visitAnnotationSubtract

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

visitAnnotationTypeRef

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

visitAnnotationUnsignedShiftRight

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

visitAnnotationValueList

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