public class AnnotationImpl extends Object implements Annotation, PersistentAnnotationValue, AnnotationValueCollection
| Constructor and Description |
|---|
AnnotationImpl()
Create an annotation with no name and no attributes.
|
AnnotationImpl(Annotation annotation)
Create new annotation by copying another one
|
AnnotationImpl(String name)
Create an annotation with a specified name.
|
| Modifier and Type | Method and Description |
|---|---|
AnnotationValue |
getAttribute(String attributeName) |
Map<String,AnnotationValue> |
getAttributes()
Returns map of attributes for this annotation (or an empty map if no attribute is defined)
|
String |
getName() |
void |
put(String attributeName,
PersistentAnnotationValue value) |
static AnnotationImpl |
read(TaggedDataInput in) |
void |
setName(String name) |
List<? extends AnnotationValue> |
toList() |
String |
toString() |
void |
write(TaggedDataOutput out) |
public AnnotationImpl()
public AnnotationImpl(@NotNull
String name)
name - namepublic AnnotationImpl(Annotation annotation)
annotation - source@NotNull public String getName()
getName in interface Annotationpublic void setName(@NotNull
String name)
setName in interface Annotation@NotNull public Map<String,AnnotationValue> getAttributes()
AnnotationgetAttributes in interface Annotationpublic void put(String attributeName, PersistentAnnotationValue value)
put in interface AnnotationValueCollection@Nullable public AnnotationValue getAttribute(@NotNull String attributeName)
getAttribute in interface Annotation@NotNull public List<? extends AnnotationValue> toList()
toList in interface AnnotationValuepublic void write(TaggedDataOutput out) throws IOException
write in interface TaggedPersistentIOExceptionpublic static AnnotationImpl read(TaggedDataInput in) throws IOException
IOExceptionCopyright © 2024 OpenClover.org. All rights reserved.