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
-
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(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(String name)
- Specified by:
getAnnotationArrayValuein interfaceAnnotation<O extends JavaType<O>>
-
removeValue
AnnotationSource<O> removeValue(String name)
-
removeAllValues
AnnotationSource<O> removeAllValues()
-
setName
AnnotationSource<O> setName(String className)
-
setEnumValue
AnnotationSource<O> setEnumValue(String name, Enum<?> value)
-
setEnumValue
AnnotationSource<O> setEnumValue(Enum<?>... value)
-
setEnumArrayValue
AnnotationSource<O> setEnumArrayValue(String name, Enum<?>... values)
-
setEnumArrayValue
AnnotationSource<O> setEnumArrayValue(Enum<?>... values)
-
setLiteralValue
AnnotationSource<O> setLiteralValue(String value)
-
setLiteralValue
AnnotationSource<O> setLiteralValue(String name, String value)
-
setStringValue
AnnotationSource<O> setStringValue(String value)
-
setStringValue
AnnotationSource<O> setStringValue(String name, String value)
-
setAnnotationValue
AnnotationSource<O> setAnnotationValue()
Set an annotation value.- Returns:
- the nested
AnnotationSource
-
setAnnotationValue
AnnotationSource<O> setAnnotationValue(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(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(Class<? extends Annotation> type)
Add an annotation value.- Returns:
- the nested
AnnotationSource - See Also:
addAnnotationValue(String)
-
addAnnotationValue
AnnotationSource<O> addAnnotationValue(String name, Class<? extends 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(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(String name, Class<?> value)
-
setClassValue
AnnotationSource<O> setClassValue(Class<?> value)
-
setClassArrayValue
AnnotationSource<O> setClassArrayValue(String name, Class<?>... values)
-
setClassArrayValue
AnnotationSource<O> setClassArrayValue(Class<?>... values)
-
setStringArrayValue
AnnotationSource<O> setStringArrayValue(String name, String[] values)
-
setStringArrayValue
AnnotationSource<O> setStringArrayValue(String[] values)
-
-