Package net.bytebuddy.description.method
Class ParameterDescription.ForLoadedParameter.Dispatcher.ForJava8CapableVm
- java.lang.Object
-
- net.bytebuddy.description.method.ParameterDescription.ForLoadedParameter.Dispatcher.ForJava8CapableVm
-
- All Implemented Interfaces:
ParameterDescription.ForLoadedParameter.Dispatcher
- Enclosing interface:
- ParameterDescription.ForLoadedParameter.Dispatcher
public static class ParameterDescription.ForLoadedParameter.Dispatcher.ForJava8CapableVm extends java.lang.Object implements ParameterDescription.ForLoadedParameter.Dispatcher
A dispatcher for VMs that support thejava.lang.reflect.Parameter
API for Java 8+.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription.ForLoadedParameter.Dispatcher
ParameterDescription.ForLoadedParameter.Dispatcher.CreationAction, ParameterDescription.ForLoadedParameter.Dispatcher.ForJava8CapableVm, ParameterDescription.ForLoadedParameter.Dispatcher.ForLegacyVm
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava8CapableVm(java.lang.reflect.Method getParameters, java.lang.reflect.Method getName, java.lang.reflect.Method isNamePresent, java.lang.reflect.Method getModifiers)
Creates a new dispatcher for a modern VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getModifiers(java.lang.reflect.AccessibleObject executable, int index)
Returns the given parameter's modifiers.java.lang.String
getName(java.lang.reflect.AccessibleObject executable, int index)
Returns the given parameter's implicit or explicit name.boolean
isNamePresent(java.lang.reflect.AccessibleObject executable, int index)
Returnstrue
if the given parameter has an explicit name.
-
-
-
Constructor Detail
-
ForJava8CapableVm
protected ForJava8CapableVm(java.lang.reflect.Method getParameters, java.lang.reflect.Method getName, java.lang.reflect.Method isNamePresent, java.lang.reflect.Method getModifiers)
Creates a new dispatcher for a modern VM.- Parameters:
getParameters
- A reference tojava.lang.reflect.Executable#getTypeArguments
.getName
- A reference tojava.lang.reflect.Parameter#getName
.isNamePresent
- A reference tojava.lang.reflect.Parameter#isNamePresent
.getModifiers
- A reference tojava.lang.reflect.Parameter#getModifiers
.
-
-
Method Detail
-
getModifiers
public int getModifiers(java.lang.reflect.AccessibleObject executable, int index)
Description copied from interface:ParameterDescription.ForLoadedParameter.Dispatcher
Returns the given parameter's modifiers.- Specified by:
getModifiers
in interfaceParameterDescription.ForLoadedParameter.Dispatcher
- Parameters:
executable
- The executable to introspect.index
- The parameter's index.- Returns:
- The parameter's modifiers.
-
isNamePresent
public boolean isNamePresent(java.lang.reflect.AccessibleObject executable, int index)
Description copied from interface:ParameterDescription.ForLoadedParameter.Dispatcher
Returnstrue
if the given parameter has an explicit name.- Specified by:
isNamePresent
in interfaceParameterDescription.ForLoadedParameter.Dispatcher
- Parameters:
executable
- The parameter to introspect.index
- The parameter's index.- Returns:
true
if the given parameter has an explicit name.
-
getName
public java.lang.String getName(java.lang.reflect.AccessibleObject executable, int index)
Description copied from interface:ParameterDescription.ForLoadedParameter.Dispatcher
Returns the given parameter's implicit or explicit name.- Specified by:
getName
in interfaceParameterDescription.ForLoadedParameter.Dispatcher
- Parameters:
executable
- The parameter to introspect.index
- The parameter's index.- Returns:
- The parameter's name.
-
-