Interface ClassSignature
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 JVMS 4.7.9.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassSignaturePREVIEW
of
(Signature.ClassTypeSigPREVIEW superclassSignature, Signature.ClassTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.static ClassSignaturePREVIEW
of
(List<Signature.TypeParamPREVIEW> typeParameters, Signature.ClassTypeSigPREVIEW superclassSignature, Signature.ClassTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.static ClassSignaturePREVIEW
Parses a raw class signature string into a SignatureReturns 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.ClassTypeSigPREVIEW superclassSignature()Returns the instantiation of the superclass in this signature.- Returns:
- the instantiation of the superclass in this signature
- Since:
- 23
-
superinterfaceSignatures
List<Signature.ClassTypeSigPREVIEW> 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.ClassTypeSigPREVIEW superclassSignature, Signature.ClassTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.- Parameters:
superclassSignature
- the superclasssuperinterfaceSignatures
- the interfaces- Returns:
- a class signature
- Since:
- 23
-
of
static ClassSignaturePREVIEW of(List<Signature.TypeParamPREVIEW> typeParameters, Signature.ClassTypeSigPREVIEW superclassSignature, Signature.ClassTypeSigPREVIEW... superinterfaceSignatures) Returns a class signature.- Parameters:
typeParameters
- the type parameterssuperclassSignature
- the superclasssuperinterfaceSignatures
- the interfaces- Returns:
- a class signature
- Since:
- 23
-
parseFrom
Parses a raw class signature string into a Signature- Parameters:
classSignature
- the raw class signature string- Returns:
- class signature
-
ClassSignature
when preview features are enabled.