- java.lang.Object
-
- com.thoughtworks.qdox.model.expression.Constant
-
- All Implemented Interfaces:
AnnotationValue
,Expression
public abstract class Constant extends Object implements AnnotationValue
-
-
Method Summary
-
-
-
Method Detail
-
getValue
public abstract Object getValue()
-
getImage
public String getImage()
-
accept
public Object accept(ExpressionVisitor visitor)
Accept a visitor for this value.- Specified by:
accept
in interfaceAnnotationValue
- Parameters:
visitor
- Visitor- Returns:
- Visitor result
-
getParameterValue
public String getParameterValue()
Get a parameter value forJavaAnnotation.getNamedParameter(String)
.- Specified by:
getParameterValue
in interfaceExpression
- Returns:
- Parameter value
-
toChar
protected static Character toChar(String value) throws IllegalArgumentException
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
protected static String toString(String value) throws IllegalArgumentException
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
-
-