Package net.bytebuddy.description.type
Enum RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm
- java.lang.Object
-
- java.lang.Enum<RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm>
-
- net.bytebuddy.description.type.RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm>
,RecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Enclosing interface:
- RecordComponentDescription.ForLoadedRecordComponent.Dispatcher
public static enum RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm extends java.lang.Enum<RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm> implements RecordComponentDescription.ForLoadedRecordComponent.Dispatcher
A dispatcher for a legacy VM that does not support records.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.RecordComponentDescription.ForLoadedRecordComponent.Dispatcher
RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.CreationAction, RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForJava14CapableVm, RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForLegacyVm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Method
getAccessor(java.lang.Object recordComponent)
Resolves a record component's accessor method.java.lang.reflect.AnnotatedElement
getAnnotatedType(java.lang.Object recordComponent)
Resolves a record component's annotated type.java.lang.Class<?>
getDeclaringType(java.lang.Object recordComponent)
Resolves a record component's declaring type.java.lang.String
getGenericSignature(java.lang.Object recordComponent)
Returns the record component type's generic signature.java.lang.reflect.Type
getGenericType(java.lang.Object recordComponent)
Resolves a record component's generic type.java.lang.String
getName(java.lang.Object recordComponent)
Resolves a record component's name.java.lang.Object[]
getRecordComponents(java.lang.Class<?> type)
Resolves a type's record components.java.lang.Class<?>
getType(java.lang.Object recordComponent)
Resolves a record component's type.boolean
isInstance(java.lang.Object instance)
Checks if the supplied instance is a record component.boolean
isRecord(java.lang.Class<?> type)
Checks if the supplied type is a record.static RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm c : RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RecordComponentDescription.ForLoadedRecordComponent.Dispatcher.ForLegacyVm valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isInstance
public boolean isInstance(java.lang.Object instance)
Checks if the supplied instance is a record component.- Specified by:
isInstance
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
instance
- The instance to evaluate.- Returns:
true
if the supplied instance is a record component.
-
getRecordComponents
public java.lang.Object[] getRecordComponents(java.lang.Class<?> type)
Resolves a type's record components.- Specified by:
getRecordComponents
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
type
- The type for which to read the record components.- Returns:
- An array of all declared record components.
-
isRecord
public boolean isRecord(java.lang.Class<?> type)
Checks if the supplied type is a record.- Specified by:
isRecord
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
type
- The type to resolve.- Returns:
true
if the supplied type is a record.
-
getName
public java.lang.String getName(java.lang.Object recordComponent)
Resolves a record component's name.- Specified by:
getName
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the name for.- Returns:
- The record component's name.
-
getDeclaringType
public java.lang.Class<?> getDeclaringType(java.lang.Object recordComponent)
Resolves a record component's declaring type.- Specified by:
getDeclaringType
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the declared type for.- Returns:
- The record component's declaring type.
-
getAccessor
public java.lang.reflect.Method getAccessor(java.lang.Object recordComponent)
Resolves a record component's accessor method.- Specified by:
getAccessor
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the accessor method for.- Returns:
- The record component's accessor method.
-
getType
public java.lang.Class<?> getType(java.lang.Object recordComponent)
Resolves a record component's type.- Specified by:
getType
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the type for.- Returns:
- The record component's type.
-
getGenericType
public java.lang.reflect.Type getGenericType(java.lang.Object recordComponent)
Resolves a record component's generic type.- Specified by:
getGenericType
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the generic type for.- Returns:
- The record component's generic type.
-
getGenericSignature
public java.lang.String getGenericSignature(java.lang.Object recordComponent)
Returns the record component type's generic signature.- Specified by:
getGenericSignature
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the generic signature for.- Returns:
- The record component type's generic signature or
null
if no signature is defined.
-
getAnnotatedType
public java.lang.reflect.AnnotatedElement getAnnotatedType(java.lang.Object recordComponent)
Resolves a record component's annotated type.- Specified by:
getAnnotatedType
in interfaceRecordComponentDescription.ForLoadedRecordComponent.Dispatcher
- Parameters:
recordComponent
- The record component to resolve the annotated type for.- Returns:
- The record component's annotated type.
-
-