W3cubDocs

/OpenJDK 25

Interface Signature.TypeArg

All Known Subinterfaces:
Signature.TypeArg.Bounded, Signature.TypeArg.Unbounded
Enclosing interface:
Signature
public static sealed interface Signature.TypeArg permits Signature.TypeArg.Unbounded, Signature.TypeArg.Bounded
Models a type argument, an argument to a type parameter.
See Java Language Specification:
4.5.1 Type Arguments of Parameterized Types
See Java Virtual Machine Specification:
4.7.9.1 Signatures
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for Signature/TypeArgSealed class hierarchy graph for Signature/TypeArg
Since:
24
See Also:

Nested Class Summary

Modifier and Type Interface Description
static interface  Signature.TypeArg.Bounded
Models a type argument with an explicit bound type.
static interface  Signature.TypeArg.Unbounded
Models an unbounded wildcard type argument *, or ? in Java programs.

Method Summary

Modifier and Type Method Description
static Signature.TypeArg.Bounded bounded(Signature.TypeArg.Bounded.WildcardIndicator wildcard, Signature.RefTypeSig boundType)
Returns a bounded type argument.
static Signature.TypeArg.Bounded extendsOf(Signature.RefTypeSig boundType)
Returns an upper-bounded wildcard type argument.
static Signature.TypeArg.Bounded of(Signature.RefTypeSig boundType)
Returns a type argument of a reference type.
static Signature.TypeArg.Bounded superOf(Signature.RefTypeSig boundType)
Returns a lower-bounded wildcard type argument.
static Signature.TypeArg.Unbounded unbounded()
Returns an unbounded wildcard type argument *.

Method Details

of

static Signature.TypeArg.Bounded of(Signature.RefTypeSig boundType)
Returns a type argument of a reference type.
Parameters:
boundType - the reference type
Returns:
a type argument of a reference type
See Also:

unbounded

static Signature.TypeArg.Unbounded unbounded()
Returns an unbounded wildcard type argument *.
Returns:
an unbounded wildcard type argument *

extendsOf

static Signature.TypeArg.Bounded extendsOf(Signature.RefTypeSig boundType)
Returns an upper-bounded wildcard type argument.
Parameters:
boundType - the upper bound
Returns:
an upper-bounded wildcard type argument
See Also:

superOf

static Signature.TypeArg.Bounded superOf(Signature.RefTypeSig boundType)
Returns a lower-bounded wildcard type argument.
Parameters:
boundType - the lower bound
Returns:
a lower-bounded wildcard type argument
See Also:

bounded

static Signature.TypeArg.Bounded bounded(Signature.TypeArg.Bounded.WildcardIndicator wildcard, Signature.RefTypeSig boundType)
Returns a bounded type argument.
Parameters:
wildcard - the wildcard indicator
boundType - the bound type
Returns:
a bounded type argument

© 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.TypeArg.html