Spec-Zone.ru › OpenJDK 25

Interface Signature.ClassTypeSig

All Superinterfaces:
Signature, Signature.RefTypeSig, Signature.ThrowableSig
Enclosing interface:
Signature
public static sealed interface Signature.ClassTypeSig extends Signature.RefTypeSig, Signature.ThrowableSig
Models the signature of a possibly-parameterized class or interface type.
See Java Virtual Machine Specification:
4.7.9.1 Signatures
Since:
24
See Also:
  • Type
  • ParameterizedType

Nested Class Summary

Nested classes/interfaces declared in interface Signature

Signature.ArrayTypeSig, Signature.BaseTypeSig, Signature.ClassTypeSig, Signature.RefTypeSig, Signature.ThrowableSig, Signature.TypeArg, Signature.TypeParam, Signature.TypeVarSig

Method Summary

Modifier and Type Method Description
default ClassDesc classDesc()
Returns this class or interface, as a symbolic descriptor.
String className()
Returns the class or interface name; includes the slash-separated package name if there is no outer type.
static Signature.ClassTypeSig of(Signature.ClassTypeSig outerType, ClassDesc className, Signature.TypeArg... typeArgs)
Returns a class or interface signature.
static Signature.ClassTypeSig of(Signature.ClassTypeSig outerType, String className, Signature.TypeArg... typeArgs)
Returns a class type signature.
static Signature.ClassTypeSig of(ClassDesc className, Signature.TypeArg... typeArgs)
Returns a class or interface signature without an outer type.
static Signature.ClassTypeSig of(String className, Signature.TypeArg... typeArgs)
Returns a class or interface signature without an outer type.
Optional<Signature.ClassTypeSig> outerType()
Returns the signature of the class that this class is a member of, only if this is a member class.
List<Signature.TypeArg> typeArgs()
Returns the type arguments of this class or interface.

Methods declared in interface Signature

signatureString

Method Details

outerType

Optional<Signature.ClassTypeSig> outerType()
Returns the signature of the class that this class is a member of, only if this is a member class. Note that the outer class may be absent if it is not a parameterized type.
Returns:
the signature of the class that this class is a member of, only if this is a member class
See Java Language Specification:
4.5 Parameterized Types

className

String className()
Returns the class or interface name; includes the slash-separated package name if there is no outer type.
Returns:
the class or interface name; includes the slash-separated package name if there is no outer type

classDesc

default ClassDesc classDesc()
Returns this class or interface, as a symbolic descriptor.
Returns:
this class or interface, as a symbolic descriptor

typeArgs

List<Signature.TypeArg> typeArgs()
Returns the type arguments of this class or interface. Note that the outer type may have more type arguments.
Returns:
the type arguments of this class or interface
See Java Language Specification:
4.5 Parameterized Types

of

static Signature.ClassTypeSig of(ClassDesc className, Signature.TypeArg... typeArgs)
Returns a class or interface signature without an outer type.
Parameters:
className - the name of the class or interface
typeArgs - the type arguments
Returns:
a class or interface signature without an outer type
Throws:
IllegalArgumentException - if className does not represent a class or interface

of

static Signature.ClassTypeSig of(Signature.ClassTypeSig outerType, ClassDesc className, Signature.TypeArg... typeArgs)
Returns a class or interface signature.
Parameters:
outerType - signature of the outer type, may be null
className - the name of this class or interface
typeArgs - the type arguments
Returns:
a class or interface signature
Throws:
IllegalArgumentException - if className does not represent a class or interface

of

static Signature.ClassTypeSig of(String className, Signature.TypeArg... typeArgs)
Returns a class or interface signature without an outer type.
Parameters:
className - the name of the class or interface
typeArgs - the type arguments
Returns:
a class or interface signature without an outer type

of

static Signature.ClassTypeSig of(Signature.ClassTypeSig outerType, String className, Signature.TypeArg... typeArgs)
Returns a class type signature.
Parameters:
outerType - signature of the outer type, may be null
className - the name of this class or interface
typeArgs - the type arguments
Returns:
a class type signature

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/Signature.ClassTypeSig.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API