Package net.bytebuddy.build
Class Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex
-
- All Implemented Interfaces:
Plugin.Factory.UsingReflection.ArgumentResolver
- Enclosing interface:
- Plugin.Factory.UsingReflection.ArgumentResolver
@Enhance public static class Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex extends java.lang.Object implements Plugin.Factory.UsingReflection.ArgumentResolver
An argument resolver that resolves an argument for a specific parameter index.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex.WithDynamicType
An argument resolver that resolves an argument for a specific parameter index by attempting a conversion via invoking a staticvalueOf
method on the target type, if it exists.-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Factory.UsingReflection.ArgumentResolver
Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex, Plugin.Factory.UsingReflection.ArgumentResolver.ForType<T>, Plugin.Factory.UsingReflection.ArgumentResolver.NoOp, Plugin.Factory.UsingReflection.ArgumentResolver.Resolution
-
-
Field Summary
Fields Modifier and Type Field Description private int
index
The index of the parameter to resolve.private java.lang.Object
value
The value to resolve for the represented index.private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
WRAPPER_TYPES
A mapping of primitive types to their wrapper types.
-
Constructor Summary
Constructors Constructor Description ForIndex(int index, java.lang.Object value)
Creates an argument resolver for a given index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Plugin.Factory.UsingReflection.ArgumentResolver.Resolution
resolve(int index, java.lang.Class<?> type)
Attempts the resolution of an argument for a given parameter.
-
-
-
Field Detail
-
WRAPPER_TYPES
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> WRAPPER_TYPES
A mapping of primitive types to their wrapper types.
-
index
private final int index
The index of the parameter to resolve.
-
value
private final java.lang.Object value
The value to resolve for the represented index.
-
-
Method Detail
-
resolve
public Plugin.Factory.UsingReflection.ArgumentResolver.Resolution resolve(int index, java.lang.Class<?> type)
Attempts the resolution of an argument for a given parameter.- Specified by:
resolve
in interfacePlugin.Factory.UsingReflection.ArgumentResolver
- Parameters:
index
- The parameter's index.type
- The parameter's type.- Returns:
- The resolution for the parameter.
-
-