- All Superinterfaces:
SignaturePREVIEW
,Signature.RefTypeSigPREVIEW
,Signature.ThrowableSigPREVIEW
public static sealed interface Signature.ClassTypeSig
extends Signature.RefTypeSigPREVIEW, Signature.ThrowableSigPREVIEW
ClassTypeSig
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 of a possibly-parameterized class or interface type.
- Since:
- 22
-
Nested Class Summary
Nested classes/interfaces declared in interface java.lang.classfile.SignaturePREVIEW
Signature.ArrayTypeSigPREVIEW, Signature.BaseTypeSigPREVIEW, Signature.ClassTypeSigPREVIEW, Signature.RefTypeSigPREVIEW, Signature.ThrowableSigPREVIEW, Signature.TypeArgPREVIEW, Signature.TypeParamPREVIEW, Signature.TypeVarSigPREVIEW
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClassDesc
Returns the class name, as a symbolic descriptor.Returns the class name.of
(Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature for an inner class.of
(Signature.ClassTypeSigPREVIEW outerType, String className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature for an inner class.of
(ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature.of
(String className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature.Returns the signature of the outer type, if any.typeArgs()
Returns the type arguments of the class.Methods declared in interface java.lang.classfile.SignaturePREVIEW
signatureString
-
Method Details
-
outerType
Optional<Signature.ClassTypeSigPREVIEW> outerType()Returns the signature of the outer type, if any.- Returns:
- the signature of the outer type, if any
-
className
-
classDesc
Returns the class name, as a symbolic descriptor.- Returns:
- the class name, as a symbolic descriptor
-
typeArgs
List<Signature.TypeArgPREVIEW> typeArgs()Returns the type arguments of the class.- Returns:
- the type arguments of the class
-
of
Returns a class type signature.- Parameters:
className
- the name of the classtypeArgs
- signatures of the type arguments- Returns:
- a class type signature
-
of
static Signature.ClassTypeSigPREVIEW of(Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature for an inner class.- Parameters:
outerType
- signature of the outer typeclassName
- the name of the classtypeArgs
- signatures of the type arguments- Returns:
- a class type signature for an inner class
-
of
Returns a class type signature.- Parameters:
className
- the name of the classtypeArgs
- signatures of the type arguments- Returns:
- a class type signature
-
of
static Signature.ClassTypeSigPREVIEW of(Signature.ClassTypeSigPREVIEW outerType, String className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature for an inner class.- Parameters:
outerType
- signature of the outer typeclassName
- the name of the classtypeArgs
- signatures of the type arguments- Returns:
- a class type signature for an inner class
-
ClassTypeSig
when preview features are enabled.