Class AnnotationDescription.AbstractBase
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationDescription.AbstractBase
-
- All Implemented Interfaces:
AnnotationDescription
- Direct Known Subclasses:
AnnotationDescription.ForLoadedAnnotation,AnnotationDescription.Latent,AnnotationDescription.Latent.Loadable,TypePool.Default.LazyTypeDescription.LazyAnnotationDescription
- Enclosing interface:
- AnnotationDescription
public abstract static class AnnotationDescription.AbstractBase extends java.lang.Object implements AnnotationDescription
An adapter implementation of an annotation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
AnnotationDescription.AbstractBase, AnnotationDescription.AnnotationInvocationHandler<T extends java.lang.annotation.Annotation>, AnnotationDescription.Builder, AnnotationDescription.ForLoadedAnnotation<S extends java.lang.annotation.Annotation>, AnnotationDescription.Latent, AnnotationDescription.Loadable<S extends java.lang.annotation.Annotation>, AnnotationDescription.RenderingDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.annotation.ElementType>DEFAULT_TARGETAn array containing all element types that are a legal annotation target when such a target is not specified explicitly.private static MethodDescription.InDefinedShapeRETENTION_VALUEA description of theRetention.value()method.private static MethodDescription.InDefinedShapeTARGET_VALUEA description of theTarget.value()method.-
Fields inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.util.Set<java.lang.annotation.ElementType>getElementTypes()Returns a set of allElementTypes that can declare this annotation.java.lang.annotation.RetentionPolicygetRetention()Returns this annotation's retention policy.AnnotationValue<?,?>getValue(java.lang.String property)Returns a value of this annotation.inthashCode()booleanisDocumented()Checks if this annotation is documented.booleanisInherited()Checks if this annotation is inherited.booleanisSupportedOn(java.lang.annotation.ElementType elementType)Checks if this annotation is supported on the supplied element type.booleanisSupportedOn(java.lang.String elementType)Checks if this annotation is supported on the supplied element type.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
getAnnotationType, getValue, prepare
-
-
-
-
Field Detail
-
DEFAULT_TARGET
private static final java.util.Set<java.lang.annotation.ElementType> DEFAULT_TARGET
An array containing all element types that are a legal annotation target when such a target is not specified explicitly.
-
RETENTION_VALUE
private static final MethodDescription.InDefinedShape RETENTION_VALUE
A description of theRetention.value()method.
-
TARGET_VALUE
private static final MethodDescription.InDefinedShape TARGET_VALUE
A description of theTarget.value()method.
-
-
Method Detail
-
getValue
public AnnotationValue<?,?> getValue(java.lang.String property)
Returns a value of this annotation.- Specified by:
getValuein interfaceAnnotationDescription- Parameters:
property- The name of the property being accessed.- Returns:
- The value for the supplied property.
-
getRetention
public java.lang.annotation.RetentionPolicy getRetention()
Returns this annotation's retention policy.- Specified by:
getRetentionin interfaceAnnotationDescription- Returns:
- This annotation's retention policy.
-
getElementTypes
public java.util.Set<java.lang.annotation.ElementType> getElementTypes()
Returns a set of allElementTypes that can declare this annotation.- Specified by:
getElementTypesin interfaceAnnotationDescription- Returns:
- A set of all element types that can declare this annotation.
-
isSupportedOn
public boolean isSupportedOn(java.lang.annotation.ElementType elementType)
Checks if this annotation is supported on the supplied element type.- Specified by:
isSupportedOnin interfaceAnnotationDescription- Parameters:
elementType- The element type to check.- Returns:
trueif the supplied element type is supported by this annotation.
-
isSupportedOn
public boolean isSupportedOn(java.lang.String elementType)
Checks if this annotation is supported on the supplied element type.- Specified by:
isSupportedOnin interfaceAnnotationDescription- Parameters:
elementType- The element type to check.- Returns:
trueif the supplied element type is supported by this annotation.
-
isInherited
public boolean isInherited()
Checks if this annotation is inherited.- Specified by:
isInheritedin interfaceAnnotationDescription- Returns:
trueif this annotation is inherited.- See Also:
Inherited
-
isDocumented
public boolean isDocumented()
Checks if this annotation is documented.- Specified by:
isDocumentedin interfaceAnnotationDescription- Returns:
trueif this annotation is documented.- See Also:
Documented
-
hashCode
@Enhance("hashCode") public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@MaybeNull java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-