Class Constant
java.lang.Object
com.thoughtworks.qdox.model.expression.Constant
- All Implemented Interfaces:
AnnotationValue, Expression
-
Method Summary
Modifier and TypeMethodDescriptionaccept(ExpressionVisitor visitor) Accept a visitor for this value.protected static StringconvertString(String str) getImage()Get a parameter value forJavaAnnotation.getNamedParameter(String).abstract ObjectgetValue()static ConstantnewBooleanLiteral(String value) static ConstantnewCharacterLiteral(String value) static ConstantnewFloatingPointLiteral(String value) static ConstantnewIntegerLiteral(String value) static ConstantnewStringLiteral(String value) protected static Booleanprotected static CharacterConvert a character literal into a character.protected static NumbertoFloatingPointLiteral(String value) protected static NumbertoIntegerLiteral(String value) toString()protected static StringConvert a string literal into a string.
-
Method Details
-
getValue
-
newBooleanLiteral
-
newCharacterLiteral
-
newFloatingPointLiteral
-
newIntegerLiteral
-
newStringLiteral
-
getImage
-
toString
-
accept
Accept a visitor for this value.- Specified by:
acceptin interfaceAnnotationValue- Parameters:
visitor- Visitor- Returns:
- Visitor result
-
getParameterValue
Get a parameter value forJavaAnnotation.getNamedParameter(String).- Specified by:
getParameterValuein interfaceExpression- Returns:
- Parameter value
-
convertString
-
toBoolean
-
toIntegerLiteral
-
toFloatingPointLiteral
-
toChar
Convert a character literal into a character.- Parameters:
value- the single quoted value- Returns:
- the transformed char
- Throws:
IllegalArgumentException- if value is not a character literal
-
toString
Convert a string literal into a string.- Parameters:
value- the double quoted value- Returns:
- the transformed String
- Throws:
IllegalArgumentException- if value is not a String literal
-