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
@Enhance public static class ParameterDescription.ForLoadedParameter.Dispatcher.ForJava8CapableVm extends Object implements ParameterDescription.ForLoadedParameter.Dispatcher
A dispatcher for VMs that support thejava.lang.reflect.ParameterAPI 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 protectedForJava8CapableVm(Method getParameters, Method getName, Method isNamePresent, Method getModifiers)Creates a new dispatcher for a modern VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetModifiers(AccessibleObject executable, int index)Returns the given parameter's modifiers.StringgetName(AccessibleObject executable, int index)Returns the given parameter's implicit or explicit name.booleanisNamePresent(AccessibleObject executable, int index)Returnstrueif the given parameter has an explicit name.
-
-
-
Constructor Detail
-
ForJava8CapableVm
protected ForJava8CapableVm(Method getParameters, Method getName, Method isNamePresent, 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(AccessibleObject executable, int index)
Returns the given parameter's modifiers.- Specified by:
getModifiersin interfaceParameterDescription.ForLoadedParameter.Dispatcher- Parameters:
executable- The executable to introspect.index- The parameter's index.- Returns:
- The parameter's modifiers.
-
isNamePresent
public boolean isNamePresent(AccessibleObject executable, int index)
Returnstrueif the given parameter has an explicit name.- Specified by:
isNamePresentin interfaceParameterDescription.ForLoadedParameter.Dispatcher- Parameters:
executable- The parameter to introspect.index- The parameter's index.- Returns:
trueif the given parameter has an explicit name.
-
getName
public String getName(AccessibleObject executable, int index)
Returns the given parameter's implicit or explicit name.- Specified by:
getNamein interfaceParameterDescription.ForLoadedParameter.Dispatcher- Parameters:
executable- The parameter to introspect.index- The parameter's index.- Returns:
- The parameter's name.
-
-