Class AnnotationDescription.AnnotationInvocationHandler.MissingValue
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationValue.Loaded.AbstractBase<java.lang.Void>
-
- net.bytebuddy.description.annotation.AnnotationDescription.AnnotationInvocationHandler.MissingValue
-
- All Implemented Interfaces:
AnnotationValue<java.lang.Void,java.lang.Void>
,AnnotationValue.Loaded<java.lang.Void>
- Enclosing class:
- AnnotationDescription.AnnotationInvocationHandler<T extends java.lang.annotation.Annotation>
protected static class AnnotationDescription.AnnotationInvocationHandler.MissingValue extends AnnotationValue.Loaded.AbstractBase<java.lang.Void> implements AnnotationValue<java.lang.Void,java.lang.Void>
Represents a missing annotation property which is not represented by a default value.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationValue
AnnotationValue.AbstractBase<U,V>, AnnotationValue.ForAnnotationDescription<U extends java.lang.annotation.Annotation>, AnnotationValue.ForConstant<U>, AnnotationValue.ForDescriptionArray<U,V>, AnnotationValue.ForEnumerationDescription<U extends java.lang.Enum<U>>, AnnotationValue.ForTypeDescription<U extends java.lang.Class<U>>, AnnotationValue.Loaded<U>, AnnotationValue.RenderingDispatcher
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationValue.Loaded
AnnotationValue.Loaded.AbstractBase<W>, AnnotationValue.Loaded.State
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<? extends java.lang.annotation.Annotation>
annotationType
The annotation type.private java.lang.String
property
The name of the property without an annotation value.-
Fields inherited from interface net.bytebuddy.description.annotation.AnnotationValue
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MissingValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.String property)
Creates a new representation for a missing annotation property.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationValue.Loaded.State
getState()
Returns the state of the represented loaded annotation value.AnnotationValue.Loaded<java.lang.Void>
load(java.lang.ClassLoader classLoader)
Returns the loaded value of this annotation.AnnotationValue.Loaded<java.lang.Void>
loadSilent(java.lang.ClassLoader classLoader)
Returns the loaded value of this annotation without throwing a checked exception.protected static AnnotationValue<?,?>
of(java.lang.reflect.Method method)
Creates a missing value for the supplied annotation property.boolean
represents(java.lang.Object value)
Verifies if this loaded value represents the supplied loaded value.java.lang.Void
resolve()
Resolves the unloaded value of this annotation.-
Methods inherited from class net.bytebuddy.description.annotation.AnnotationValue.Loaded.AbstractBase
resolve
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.annotation.AnnotationValue
resolve
-
-
-
-
Constructor Detail
-
MissingValue
protected MissingValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.String property)
Creates a new representation for a missing annotation property.- Parameters:
annotationType
- The annotation type.property
- The name of the property without an annotation value.
-
-
Method Detail
-
of
protected static AnnotationValue<?,?> of(java.lang.reflect.Method method)
Creates a missing value for the supplied annotation property.- Parameters:
method
- A method representing an annotation property.- Returns:
- An annotation value for a missing property.
-
getState
public AnnotationValue.Loaded.State getState()
Returns the state of the represented loaded annotation value.- Specified by:
getState
in interfaceAnnotationValue.Loaded<java.lang.Void>
- Returns:
- The state represented by this instance.
-
represents
public boolean represents(java.lang.Object value)
Verifies if this loaded value represents the supplied loaded value.- Specified by:
represents
in interfaceAnnotationValue.Loaded<java.lang.Void>
- Parameters:
value
- A loaded annotation value.- Returns:
true
if the supplied annotation value is represented by this annotation value.
-
load
public AnnotationValue.Loaded<java.lang.Void> load(java.lang.ClassLoader classLoader)
Returns the loaded value of this annotation.- Specified by:
load
in interfaceAnnotationValue<java.lang.Void,java.lang.Void>
- Parameters:
classLoader
- The class loader for loading this value.- Returns:
- The loaded value of this annotation.
-
loadSilent
public AnnotationValue.Loaded<java.lang.Void> loadSilent(java.lang.ClassLoader classLoader)
Returns the loaded value of this annotation without throwing a checked exception.- Specified by:
loadSilent
in interfaceAnnotationValue<java.lang.Void,java.lang.Void>
- Parameters:
classLoader
- The class loader for loading this value.- Returns:
- The loaded value of this annotation.
-
resolve
public java.lang.Void resolve()
Resolves the unloaded value of this annotation.- Specified by:
resolve
in interfaceAnnotationValue<java.lang.Void,java.lang.Void>
- Specified by:
resolve
in interfaceAnnotationValue.Loaded<java.lang.Void>
- Returns:
- The unloaded value of this annotation.
-
-