Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use MethodParametersAttribute
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
MethodParameters
attribute 4.7.24, which can
appear on methods, and records optional information about the method's
parameters. Delivered as a java.lang.classfile.MethodElement
when
traversing the elements of a java.lang.classfile.MethodModel
.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
The attribute was introduced in the Java SE Platform version 8.
Modifier and Type | Method and Description |
---|---|
public static MethodParametersAttribute | Returns: aMethodParameters attributethe method parameter descriptions parameters)Returns a |
public static MethodParametersAttribute | Returns: aMethodParameters attributethe method parameter descriptions parameters)Returns a |
public List | Returns: information about the parameters of the methodReturns information about the parameters of the method. |
of | back to summary |
---|---|
public static MethodParametersAttribute of(List<MethodParameterInfo> parameters) Returns a
|
of | back to summary |
---|---|
public static MethodParametersAttribute of(MethodParameterInfo... parameters) Returns a
|
parameters | back to summary |
---|---|
public List Returns information about the parameters of the method. The i'th entry in the list corresponds to the i'th parameter in the method declaration.
|