Class AnnotationValueAccess
- java.lang.Object
-
- com.hello2morrow.sonargraph.languageprovider.java.api.model.AnnotationValueAccess
-
- All Implemented Interfaces:
IAnnotationValueAccess
- Direct Known Subclasses:
AnnotationAccess
public class AnnotationValueAccess extends java.lang.Object implements IAnnotationValueAccess
Access object for annotation values.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Boolean
getBooleanValue()
Return boolean annotation value.java.lang.String
getClassName()
Return name of referenced class.IJavaFieldAccess
getEnumConstant()
Return enum constant as field.java.lang.String
getEnumContantName()
Return enum constant name.IJavaFieldAccess
getEumConstant()
Deprecated.java.lang.Number
getNumericValue()
Return numeric annotation value.IJavaTypeAccess
getReferencedClass()
Return referenced class.java.lang.String
getStringValue()
Return string annotation value.java.util.List<IAnnotationValueAccess>
getValueList()
Return list of annotation values.java.lang.String
toString()
-
-
-
Method Detail
-
getStringValue
public java.lang.String getStringValue()
Return string annotation value.- Specified by:
getStringValue
in interfaceIAnnotationValueAccess
- Returns:
- Return string annotation value or null, if the value is not a string.
-
getNumericValue
public java.lang.Number getNumericValue()
Return numeric annotation value.- Specified by:
getNumericValue
in interfaceIAnnotationValueAccess
- Returns:
- Return numeric annotation value of null, if the value is not a number.
-
getBooleanValue
public java.lang.Boolean getBooleanValue()
Return boolean annotation value.- Specified by:
getBooleanValue
in interfaceIAnnotationValueAccess
- Returns:
- Return boolean annotation value of null, if the value is not a boolean.
-
getEnumContantName
public java.lang.String getEnumContantName()
Return enum constant name.- Specified by:
getEnumContantName
in interfaceIAnnotationValueAccess
- Returns:
- Return enum constant name or null, if the value is ot an enum constant.
-
getEnumConstant
public IJavaFieldAccess getEnumConstant()
Return enum constant as field.- Specified by:
getEnumConstant
in interfaceIAnnotationValueAccess
- Returns:
- Return enum constant as field or null, if value is not an enum constant or was not resolved.
-
getEumConstant
@Deprecated public IJavaFieldAccess getEumConstant()
Deprecated.Return enum constant as field.- Specified by:
getEumConstant
in interfaceIAnnotationValueAccess
- Returns:
- Return enum constant as field or null, if value is not an enum constant or was not resolved.
-
getClassName
public java.lang.String getClassName()
Return name of referenced class.- Specified by:
getClassName
in interfaceIAnnotationValueAccess
- Returns:
- Return name of referenced class or null, if value if not a class.
-
getReferencedClass
public IJavaTypeAccess getReferencedClass()
Return referenced class.- Specified by:
getReferencedClass
in interfaceIAnnotationValueAccess
- Returns:
- Return referenced class or null, if value is not a class or could not be resolved.
-
getValueList
public java.util.List<IAnnotationValueAccess> getValueList()
Return list of annotation values.- Specified by:
getValueList
in interfaceIAnnotationValueAccess
- Returns:
- Return list of annotation values or null, if the value is not a list.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-