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:
- Since:
- 24
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Models a type argument with an explicit bound type.static interface
Models an unbounded wildcard type argument*
, or?
in Java programs. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic 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
Returns an unbounded wildcard type argument*
.
-
Method Details
-
of
Returns a type argument of a reference type.- Parameters:
boundType
- the reference type- Returns:
- a type argument of a reference type
- See Also:
-
unbounded
Returns an unbounded wildcard type argument*
.- Returns:
- an unbounded wildcard type argument
*
-
extendsOf
Returns an upper-bounded wildcard type argument.- Parameters:
boundType
- the upper bound- Returns:
- an upper-bounded wildcard type argument
- See Also:
-
superOf
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 indicatorboundType
- the bound type- Returns:
- a bounded type argument
-