public interface JavaAnnotationSource extends JavaAnnotation<JavaAnnotationSource>, JavaSource<JavaAnnotationSource>
@interface annotation source file as an in-memory modifiable element. See
Roaster for various options in generating JavaAnnotationSource instances.| Modifier and Type | Method and Description |
|---|---|
AnnotationElementSource |
addAnnotationElement()
Add a new Java
AnnotationElementSource to this JavaAnnotationSource instance. |
AnnotationElementSource |
addAnnotationElement(String declaration)
Add a new
AnnotationElementSource declaration to this JavaAnnotationSource instance, using the given
String as the declaration. |
AnnotationElementSource |
getAnnotationElement(String name)
Get the
AnnotationElementSource with the given name and return it, otherwise, return null. |
List<AnnotationElementSource> |
getAnnotationElements()
Get a list of all
AnnotationElementSources declared by this JavaAnnotation, or return an empty
list if no AnnotationElementSources are declared. |
JavaAnnotationSource |
removeAnnotationElement(AnnotationElement<?> annotationElement)
Remove the given
AnnotationElement from this JavaAnnotationSource instance, if it exists;
otherwise, do nothing. |
hasAnnotationElement, hasAnnotationElementgetEnclosingType, getNestedClassesgetCanonicalName, getQualifiedName, getSyntaxErrors, hasSyntaxErrors, isAnnotation, isClass, isEnum, isInterfacesetDefaultPackage, setPackagegetPackage, isDefaultPackageaddImport, addImport, addImport, addImport, getImport, getImport, getImport, getImport, getImports, hasImport, hasImport, hasImport, hasImport, removeImport, removeImport, removeImport, removeImport, requiresImport, requiresImport, resolveTypesetNamesetPackagePrivate, setPrivate, setProtected, setPublic, setVisibilitygetVisibility, isPackagePrivate, isPrivate, isProtected, isPublicaddAnnotation, addAnnotation, addAnnotation, getAnnotation, getAnnotation, getAnnotations, removeAnnotationhasAnnotation, hasAnnotationgetInternalAnnotationElementSource getAnnotationElement(String name)
AnnotationElementSource with the given name and return it, otherwise, return null.getAnnotationElement in interface JavaAnnotation<JavaAnnotationSource>List<AnnotationElementSource> getAnnotationElements()
AnnotationElementSources declared by this JavaAnnotation, or return an empty
list if no AnnotationElementSources are declared.getAnnotationElements in interface JavaAnnotation<JavaAnnotationSource>AnnotationElementSource addAnnotationElement()
AnnotationElementSource to this JavaAnnotationSource instance. This will be a stub until
further modified.AnnotationElementSource addAnnotationElement(String declaration)
AnnotationElementSource declaration to this JavaAnnotationSource instance, using the given
String as the declaration.
For example:AnnotationElement e = javaClass.addAnnotationElement("String newAnnotationElement();");JavaAnnotationSource removeAnnotationElement(AnnotationElement<?> annotationElement)
AnnotationElement from this JavaAnnotationSource instance, if it exists;
otherwise, do nothing.Copyright © 2014 JBoss by Red Hat. All rights reserved.