Package serp.bytecode
Class Annotated
- java.lang.Object
-
- serp.bytecode.Attributes
-
- serp.bytecode.Annotated
-
- All Implemented Interfaces:
BCEntity
public abstract class Annotated extends Attributes
An annotated entity.
-
-
Constructor Summary
Constructors Constructor Description Annotated()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
ensureBytecodeVersion()
When adding annotations, make sure the bytecode spec supports them.(package private) abstract BCClass
getBCClass()
Internal access to the owning class.Annotations
getDeclaredAnnotations(boolean add)
Return runtime invisible annotation information for the entity.Annotations
getDeclaredRuntimeAnnotations(boolean add)
Return runtime visible annotation information for the entity.boolean
removeDeclaredAnnotations()
Remove the runtime invisible annotations attribute for the entity.boolean
removeDeclaredRuntimeAnnotations()
Remove the runtime visible annotations attribute for the entity.-
Methods inherited from class serp.bytecode.Attributes
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, getAttributesHolder, readAttributes, removeAttribute, removeAttribute, setAttributes, visitAttributes, writeAttributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface serp.bytecode.BCEntity
getClassLoader, getPool, getProject, isValid
-
-
-
-
Method Detail
-
getDeclaredAnnotations
public Annotations getDeclaredAnnotations(boolean add)
Return runtime invisible annotation information for the entity. Acts internally through theAttributes
interface.- Parameters:
add
- if true, a new annotations attribute will be added if not already present- Returns:
- the annotation information, or null if none and the
add
param is set to false
-
removeDeclaredAnnotations
public boolean removeDeclaredAnnotations()
Remove the runtime invisible annotations attribute for the entity. Acts internally through theAttributes
interface.- Returns:
- true if there was an attribute to remove
-
getDeclaredRuntimeAnnotations
public Annotations getDeclaredRuntimeAnnotations(boolean add)
Return runtime visible annotation information for the entity. Acts internally through theAttributes
interface.- Parameters:
add
- if true, a new runtime annotations attribute will be added if not already present- Returns:
- the annotation information, or null if none and the
add
param is set to false
-
removeDeclaredRuntimeAnnotations
public boolean removeDeclaredRuntimeAnnotations()
Remove the runtime visible annotations attribute for the entity. Acts internally through theAttributes
interface.- Returns:
- true if there was an attribute to remove
-
ensureBytecodeVersion
private void ensureBytecodeVersion()
When adding annotations, make sure the bytecode spec supports them.
-
getBCClass
abstract BCClass getBCClass()
Internal access to the owning class.
-
-