Class Constant
java.lang.Object
com.thoughtworks.qdox.model.expression.Constant
- All Implemented Interfaces:
AnnotationValue
,Expression
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ExpressionVisitor visitor) Accept a visitor for this value.protected static String
convertString
(String str) getImage()
Get a parameter value forJavaAnnotation.getNamedParameter(String)
.abstract Object
getValue()
static Constant
newBooleanLiteral
(String value) static Constant
newCharacterLiteral
(String value) static Constant
newFloatingPointLiteral
(String value) static Constant
newIntegerLiteral
(String value) static Constant
newStringLiteral
(String value) protected static Boolean
protected static Character
Convert a character literal into a character.protected static Number
toFloatingPointLiteral
(String value) protected static Number
toIntegerLiteral
(String value) toString()
protected static String
Convert a string literal into a string.
-
Field Details
-
image
-
-
Constructor Details
-
Constant
-
-
Method Details
-
getValue
-
newBooleanLiteral
-
newCharacterLiteral
-
newFloatingPointLiteral
-
newIntegerLiteral
-
newStringLiteral
-
getImage
-
toString
-
accept
Accept a visitor for this value.- Specified by:
accept
in interfaceAnnotationValue
- Parameters:
visitor
- Visitor- Returns:
- Visitor result
-
getParameterValue
Get a parameter value forJavaAnnotation.getNamedParameter(String)
.- Specified by:
getParameterValue
in 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
-