public sealed interface ClassSignature
ClassSignature
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 generic signature of a class file, as defined by 4.7.9.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassSignaturePREVIEW
of
(Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.static ClassSignaturePREVIEW
of
(List<Signature.TypeParamPREVIEW> typeParameters, Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.static ClassSignaturePREVIEW
Returns the raw signature string.Returns the instantiation of the superclass in this signature.Returns the instantiation of the interfaces in this signature.Returns the type parameters of this class.
-
Method Details
-
typeParameters
List<Signature.TypeParamPREVIEW> typeParameters()Returns the type parameters of this class.- Returns:
- the type parameters of this class
-
superclassSignature
Signature.RefTypeSigPREVIEW superclassSignature()Returns the instantiation of the superclass in this signature.- Returns:
- the instantiation of the superclass in this signature
-
superinterfaceSignatures
List<Signature.RefTypeSigPREVIEW> superinterfaceSignatures()Returns the instantiation of the interfaces in this signature.- Returns:
- the instantiation of the interfaces in this signature
-
signatureString
-
of
static ClassSignaturePREVIEW of(Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.- Parameters:
superclassSignature
- the superclasssuperinterfaceSignatures
- the interfaces- Returns:
- a class signature
-
of
static ClassSignaturePREVIEW of(List<Signature.TypeParamPREVIEW> typeParameters, Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.- Parameters:
typeParameters
- the type parameterssuperclassSignature
- the superclasssuperinterfaceSignatures
- the interfaces- Returns:
- a class signature
-
parseFrom
- Parameters:
classSignature
- the raw class signature string- Returns:
- class signature
-
ClassSignature
when preview features are enabled.