Interface SignatureAttribute
- All Superinterfaces:
AttributePREVIEW<SignatureAttributePREVIEW>,ClassElementPREVIEW,ClassFileElementPREVIEW,FieldElementPREVIEW,MethodElementPREVIEW
public sealed interface SignatureAttribute
extends AttributePREVIEW<SignatureAttributePREVIEW>, ClassElementPREVIEW, MethodElementPREVIEW, FieldElementPREVIEW
SignatureAttribute 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 the
Signature attribute (JVMS 4.7.9), which
can appear on classes, methods, or fields. Delivered as a
ClassElementPREVIEW, FieldElementPREVIEW, or
MethodElementPREVIEW when traversing
the corresponding model type.
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 5.0.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClassSignaturePREVIEWParse the signature as a class signature.default MethodSignaturePREVIEWParse the signature as a method signature.Parse the signature as a type signature.static SignatureAttributePREVIEWof(ClassSignaturePREVIEW classSignature) Returns aSignatureattribute for a class.static SignatureAttributePREVIEWReturns aSignatureattribute.static SignatureAttributePREVIEWof(MethodSignaturePREVIEW methodSignature) Returns aSignatureattribute for a method.static SignatureAttributePREVIEWReturns aSignatureattribute.Returns the signature for the class, method, or field.Methods declared in interface java.lang.classfile.AttributePREVIEW
attributeMapper, attributeName
-
Method Details
-
signature
-
asClassSignature
Parse the signature as a class signature.- Returns:
- the class signature
-
asMethodSignature
Parse the signature as a method signature.- Returns:
- the method signature
-
asTypeSignature
-
of
Returns aSignatureattribute for a class.- Parameters:
classSignature- the signature- Returns:
- a
Signatureattribute for a class
-
of
Returns aSignatureattribute for a method.- Parameters:
methodSignature- the signature- Returns:
- a
Signatureattribute for a method
-
of
Returns aSignatureattribute.- Parameters:
signature- the signature- Returns:
- a
Signatureattribute
-
of
Returns aSignatureattribute.- Parameters:
signature- the signature- Returns:
- a
Signatureattribute
-
SignatureAttributewhen preview features are enabled.