Class AnnotationValue.ForAnnotationDescription.IncompatibleRuntimeType
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationValue.Loaded.AbstractBase<java.lang.annotation.Annotation>
-
- net.bytebuddy.description.annotation.AnnotationValue.ForAnnotationDescription.IncompatibleRuntimeType
-
- All Implemented Interfaces:
AnnotationValue.Loaded<java.lang.annotation.Annotation>
- Enclosing class:
- AnnotationValue.ForAnnotationDescription<U extends java.lang.annotation.Annotation>
public static class AnnotationValue.ForAnnotationDescription.IncompatibleRuntimeType extends AnnotationValue.Loaded.AbstractBase<java.lang.annotation.Annotation>
Represents an annotation value which was attempted to ba loaded by a type that does not represent an annotation value.
Note: Neither of
Object.hashCode()
,Object.toString()
andObject.equals(Object)
are implemented specifically what resembles the way such exceptional states are represented in the Open JDK's annotation implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationValue.Loaded
AnnotationValue.Loaded.AbstractBase<W>, AnnotationValue.Loaded.State
-
-
Constructor Summary
Constructors Constructor Description IncompatibleRuntimeType(java.lang.Class<?> incompatibleType)
Creates a new representation for an annotation with an incompatible runtime type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationValue.Loaded.State
getState()
Returns the state of the represented loaded annotation value.boolean
represents(java.lang.Object value)
Verifies if this loaded value represents the supplied loaded value.java.lang.annotation.Annotation
resolve()
Resolves the value to the actual value of an annotation.-
Methods inherited from class net.bytebuddy.description.annotation.AnnotationValue.Loaded.AbstractBase
resolve
-
-
-
-
Method Detail
-
getState
public AnnotationValue.Loaded.State getState()
Description copied from interface:AnnotationValue.Loaded
Returns the state of the represented loaded annotation value.- Returns:
- The state represented by this instance.
-
resolve
public java.lang.annotation.Annotation resolve()
Description copied from interface:AnnotationValue.Loaded
Resolves the value to the actual value of an annotation. Calling this method might throw a runtime exception if this value is either not defined or not resolved.- Returns:
- The actual annotation value represented by this instance.
-
represents
public boolean represents(java.lang.Object value)
Description copied from interface:AnnotationValue.Loaded
Verifies if this loaded value represents the supplied loaded value.- Parameters:
value
- A loaded annotation value.- Returns:
true
if the supplied annotation value is represented by this annotation value.
-
-