Interface AnnotationSource<O extends JavaType<O>>
-
- All Superinterfaces:
Annotation<O>,Internal,Origin<O>
public interface AnnotationSource<O extends JavaType<O>> extends Annotation<O>
Represents an annotation on some Java source element.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AnnotationSource<O>addAnnotationValue()Add an annotation value.AnnotationSource<O>addAnnotationValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)Add an annotation value.AnnotationSource<O>addAnnotationValue(java.lang.String name)Add a named annotation value.AnnotationSource<O>addAnnotationValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)Add an annotation value.AnnotationSource<O>[]getAnnotationArrayValue()AnnotationSource<O>[]getAnnotationArrayValue(java.lang.String name)AnnotationSource<O>getAnnotationValue()AnnotationSource<O>getAnnotationValue(java.lang.String name)AnnotationSource<O>removeAllValues()AnnotationSource<O>removeAnnotationValue(java.lang.String name, Annotation<O> element)Removeelementfrom the array of values associated with the specified annotation element.AnnotationSource<O>removeAnnotationValue(Annotation<O> element)Removeelementfrom the array of values associated with the"value"annotation element.AnnotationSource<O>removeValue(java.lang.String name)AnnotationSource<O>setAnnotationValue()Set an annotation value.AnnotationSource<O>setAnnotationValue(java.lang.String name)Set a named annotation value.AnnotationSource<O>setClassArrayValue(java.lang.Class<?>... values)AnnotationSource<O>setClassArrayValue(java.lang.String name, java.lang.Class<?>... values)AnnotationSource<O>setClassValue(java.lang.Class<?> value)AnnotationSource<O>setClassValue(java.lang.String name, java.lang.Class<?> value)AnnotationSource<O>setEnumArrayValue(java.lang.Enum<?>... values)AnnotationSource<O>setEnumArrayValue(java.lang.String name, java.lang.Enum<?>... values)AnnotationSource<O>setEnumValue(java.lang.Enum<?>... value)AnnotationSource<O>setEnumValue(java.lang.String name, java.lang.Enum<?> value)AnnotationSource<O>setLiteralValue(java.lang.String value)AnnotationSource<O>setLiteralValue(java.lang.String name, java.lang.String value)AnnotationSource<O>setName(java.lang.String className)AnnotationSource<O>setStringArrayValue(java.lang.String[] values)AnnotationSource<O>setStringArrayValue(java.lang.String name, java.lang.String[] values)AnnotationSource<O>setStringValue(java.lang.String value)AnnotationSource<O>setStringValue(java.lang.String name, java.lang.String value)-
Methods inherited from interface org.jboss.forge.roaster.model.Annotation
getClassArrayValue, getClassArrayValue, getClassValue, getClassValue, getEnumArrayValue, getEnumArrayValue, getEnumValue, getEnumValue, getLiteralValue, getLiteralValue, getName, getQualifiedName, getStringArrayValue, getStringArrayValue, getStringValue, getStringValue, getValues, isMarker, isNormal, isSingleValue, isTypeElementDefined
-
Methods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
-
-
-
Method Detail
-
getAnnotationValue
AnnotationSource<O> getAnnotationValue()
- Specified by:
getAnnotationValuein interfaceAnnotation<O extends JavaType<O>>
-
getAnnotationValue
AnnotationSource<O> getAnnotationValue(java.lang.String name)
- Specified by:
getAnnotationValuein interfaceAnnotation<O extends JavaType<O>>
-
getAnnotationArrayValue
AnnotationSource<O>[] getAnnotationArrayValue()
- Specified by:
getAnnotationArrayValuein interfaceAnnotation<O extends JavaType<O>>
-
getAnnotationArrayValue
AnnotationSource<O>[] getAnnotationArrayValue(java.lang.String name)
- Specified by:
getAnnotationArrayValuein interfaceAnnotation<O extends JavaType<O>>
-
removeValue
AnnotationSource<O> removeValue(java.lang.String name)
-
removeAllValues
AnnotationSource<O> removeAllValues()
-
setName
AnnotationSource<O> setName(java.lang.String className)
-
setEnumValue
AnnotationSource<O> setEnumValue(java.lang.String name, java.lang.Enum<?> value)
-
setEnumValue
AnnotationSource<O> setEnumValue(java.lang.Enum<?>... value)
-
setEnumArrayValue
AnnotationSource<O> setEnumArrayValue(java.lang.String name, java.lang.Enum<?>... values)
-
setEnumArrayValue
AnnotationSource<O> setEnumArrayValue(java.lang.Enum<?>... values)
-
setLiteralValue
AnnotationSource<O> setLiteralValue(java.lang.String value)
-
setLiteralValue
AnnotationSource<O> setLiteralValue(java.lang.String name, java.lang.String value)
-
setStringValue
AnnotationSource<O> setStringValue(java.lang.String value)
-
setStringValue
AnnotationSource<O> setStringValue(java.lang.String name, java.lang.String value)
-
setAnnotationValue
AnnotationSource<O> setAnnotationValue()
Set an annotation value.- Returns:
- the nested
AnnotationSource
-
setAnnotationValue
AnnotationSource<O> setAnnotationValue(java.lang.String name)
Set a named annotation value.- Parameters:
name-- Returns:
- the nested
AnnotationSource
-
addAnnotationValue
AnnotationSource<O> addAnnotationValue()
Add an annotation value.- Returns:
- the nested
AnnotationSource - See Also:
addAnnotationValue(String)
-
addAnnotationValue
AnnotationSource<O> addAnnotationValue(java.lang.String name)
Add a named annotation value. When there is no existing annotation or annotation array value forname, a single unwrapped annotation value will be created (as withsetAnnotationValue(String)); otherwise an unwrapped annotation value will be promoted to an array and a new element will be added.- Parameters:
name-- Returns:
- the nested
AnnotationSource
-
addAnnotationValue
AnnotationSource<O> addAnnotationValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Add an annotation value.- Returns:
- the nested
AnnotationSource - See Also:
addAnnotationValue(String)
-
addAnnotationValue
AnnotationSource<O> addAnnotationValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)
Add an annotation value.- Parameters:
name-- Returns:
- the nested
AnnotationSource - See Also:
addAnnotationValue(String)
-
removeAnnotationValue
AnnotationSource<O> removeAnnotationValue(Annotation<O> element)
Removeelementfrom the array of values associated with the"value"annotation element.- Parameters:
element-- Returns:
- this, fluently
-
removeAnnotationValue
AnnotationSource<O> removeAnnotationValue(java.lang.String name, Annotation<O> element)
Removeelementfrom the array of values associated with the specified annotation element.- Parameters:
name-element-- Returns:
- this, fluently
-
setClassValue
AnnotationSource<O> setClassValue(java.lang.String name, java.lang.Class<?> value)
-
setClassValue
AnnotationSource<O> setClassValue(java.lang.Class<?> value)
-
setClassArrayValue
AnnotationSource<O> setClassArrayValue(java.lang.String name, java.lang.Class<?>... values)
-
setClassArrayValue
AnnotationSource<O> setClassArrayValue(java.lang.Class<?>... values)
-
setStringArrayValue
AnnotationSource<O> setStringArrayValue(java.lang.String name, java.lang.String[] values)
-
setStringArrayValue
AnnotationSource<O> setStringArrayValue(java.lang.String[] values)
-
-