public sealed interface MethodParameterInfo
MethodParameterInfo
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a single method parameter in the
MethodParametersAttribute
PREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptiondefault Set
<AccessFlag> flags()
Parameter access flags for this parameter.int
Parameter access flags for this parameter, as a bit mask.default boolean
has
(AccessFlag flag) Returns whether the method parameter has a specific flag set.name()
The name of the method parameter, if there is one.static MethodParameterInfoPREVIEW
Returns a method parameter description.static MethodParameterInfoPREVIEW
of
(Optional<String> name, AccessFlag... flags) Returns a method parameter description.static MethodParameterInfoPREVIEW
ofParameter
(Optional<String> name, int flags) Returns a method parameter description.
-
Method Details
-
name
-
flagsMask
int flagsMask()Parameter access flags for this parameter, as a bit mask. Valid parameter flags includeClassFile.ACC_FINAL
PREVIEW,ClassFile.ACC_SYNTHETIC
PREVIEW, andClassFile.ACC_MANDATED
PREVIEW.- Returns:
- the access flags, as a bit mask
-
flags
Parameter access flags for this parameter.- Returns:
- the access flags, as a bit mask
-
has
Returns whether the method parameter has a specific flag set.- Parameters:
flag
- the method parameter flag- Returns:
- whether the method parameter has a specific flag set
-
of
Returns a method parameter description.- Parameters:
name
- the method parameter nameflags
- the method parameter access flags- Returns:
- a method parameter description
-
of
Returns a method parameter description.- Parameters:
name
- the method parameter nameflags
- the method parameter access flags- Returns:
- a method parameter description
-
ofParameter
Returns a method parameter description.- Parameters:
name
- the method parameter nameflags
- the method parameter access flags- Returns:
- a method parameter description
-
MethodParameterInfo
when preview features are enabled.