@HashCodeAndEqualsPlugin.Enhance public static class Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex extends java.lang.Object implements Plugin.Factory.UsingReflection.ArgumentResolver
| Modifier and Type | Class and 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 static
valueOf method on the target type, if it exists. |
Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex, Plugin.Factory.UsingReflection.ArgumentResolver.ForType<T>, Plugin.Factory.UsingReflection.ArgumentResolver.NoOp, Plugin.Factory.UsingReflection.ArgumentResolver.Resolution| Modifier and Type | Field and 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 and Description |
|---|
ForIndex(int index,
java.lang.Object value)
Creates an argument resolver for a given index.
|
| Modifier and Type | Method and Description |
|---|---|
Plugin.Factory.UsingReflection.ArgumentResolver.Resolution |
resolve(int index,
java.lang.Class<?> type)
Attempts the resolution of an argument for a given parameter.
|
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> WRAPPER_TYPES
private final int index
private final java.lang.Object value
public ForIndex(int index,
java.lang.Object value)
index - The index of the parameter to resolve.value - The value to resolve for the represented index.public Plugin.Factory.UsingReflection.ArgumentResolver.Resolution resolve(int index, java.lang.Class<?> type)
resolve in interface Plugin.Factory.UsingReflection.ArgumentResolverindex - The parameter's index.type - The parameter's type.