Interface IJavaAnnotation
- All Superinterfaces:
IJavaElement
,IJavaExpression
Java AST interface to represent a Java annotation.
Example:
@SomeAnnotation(...)
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
FLAG_BUILT, FLAG_FIELD_REFERENCES_OUTERCLASS, FLAG_LAMBDA_CLASS, FLAG_LAMBDA_IMPL, FLAG_OPTIONAL_RENDERING, FLAG_SECOND_PARAMETER_IS_OUTER_REF, FLAG_STICKY
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate this element.void
generate
(JavaOutputSink out, char charAfterAnno) Custom generator.Get the elements of this annotation.getType()
Get the annotation type.void
Set or update the annotation type.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
addFlags, addTag, canCauseException, collectAllPhysicalOffsets, generate, getData, getElementType, getFlags, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getReconAnon, getReconEnum, getReconEnummap, getReconLambda, getSubElements, getTags, hasFlags, hasPhysicalMethodIndex, hasPhysicalOffset, isReconArtifact, removeFlags, removeTag, replaceSubElement, setData, setFlags, setLambdaRecon, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setReconAnon, setReconEnum, setReconEnummap, toShortString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre
-
Method Details
-
getType
IJavaType getType()Get the annotation type.- Returns:
-
setType
Set or update the annotation type.- Parameters:
type
-
-
getElements
List<IJavaAnnotationElement> getElements()Get the elements of this annotation. The actual list is returned and may be modified.- Returns:
-
generate
Custom generator.- Parameters:
out
- output sinkcharAfterAnno
- a character to be appended after the annotation; 0 if none
-
duplicate
IJavaAnnotation duplicate()Description copied from interface:IJavaElement
Duplicate this element.- Specified by:
duplicate
in interfaceIJavaElement
- Specified by:
duplicate
in interfaceIJavaExpression
- Returns:
- a (possibly) duplicated object of the same type
-