public static class ParameterDescription.ForLoadedParameter.Dispatcher.ForModernVm extends Object implements ParameterDescription.ForLoadedParameter.Dispatcher
java.lang.reflect.Parameter
API for Java 8+.ParameterDescription.ForLoadedParameter.Dispatcher.ForLegacyVm, ParameterDescription.ForLoadedParameter.Dispatcher.ForModernVm
Modifier | Constructor and Description |
---|---|
protected |
ForModernVm(Method getName,
Method getDeclaringExecutable,
Method isNamePresent,
Method getModifiers,
Method getDeclaredAnnotations)
Creates a new dispatcher for a modern VM.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
List<Annotation> |
getDeclaredAnnotations(Object parameter)
Returns the given parameter's annotations.
|
Object |
getDeclaringExecutable(Object parameter)
Returns the given parameter's declaring exectuable, i.e, method or constructor.
|
int |
getModifiers(Object parameter)
Returns the given parameter's modifiers.
|
String |
getName(Object parameter)
Returns the given parameter's implicit or explicit name.
|
int |
hashCode() |
boolean |
isNamePresent(Object parameter)
Returns
true if the given parameter has an explicit name. |
String |
toString() |
protected ForModernVm(Method getName, Method getDeclaringExecutable, Method isNamePresent, Method getModifiers, Method getDeclaredAnnotations)
getName
- A reference to java.lang.reflect.Parameter#getName
.getDeclaringExecutable
- A reference to java.lang.reflect.Parameter#getDeclaringExecutable
.isNamePresent
- A reference to java.lang.reflect.Parameter#isNamePresent
.getModifiers
- A reference to java.lang.reflect.Parameter#getModifiers
.getDeclaredAnnotations
- A reference to java.lang.reflect.Parameter#getDeclaredAnnotations
.public int getModifiers(Object parameter)
ParameterDescription.ForLoadedParameter.Dispatcher
getModifiers
in interface ParameterDescription.ForLoadedParameter.Dispatcher
parameter
- The parameter to introspect.public boolean isNamePresent(Object parameter)
ParameterDescription.ForLoadedParameter.Dispatcher
true
if the given parameter has an explicit name.isNamePresent
in interface ParameterDescription.ForLoadedParameter.Dispatcher
parameter
- The parameter to introspect.true
if the given parameter has an explicit name.public String getName(Object parameter)
ParameterDescription.ForLoadedParameter.Dispatcher
getName
in interface ParameterDescription.ForLoadedParameter.Dispatcher
parameter
- The parameter to introspect.public List<Annotation> getDeclaredAnnotations(Object parameter)
ParameterDescription.ForLoadedParameter.Dispatcher
getDeclaredAnnotations
in interface ParameterDescription.ForLoadedParameter.Dispatcher
parameter
- The parameter to introspect.public Object getDeclaringExecutable(Object parameter)
ParameterDescription.ForLoadedParameter.Dispatcher
getDeclaringExecutable
in interface ParameterDescription.ForLoadedParameter.Dispatcher
parameter
- The parameter to introspect.Copyright © 2014–2015. All rights reserved.