TypeOf

abstract class TypeOf<T>(source)

Provides a way to preserve high-fidelity Type information on generic types. Capture a generic type with an anonymous subclass. For example:


  new TypeOf<NamedDomainObjectContainer<ArtifactRepository>>() {}

Since

3.5

Parameters

<T>

Parameterized type

Functions

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
Returns the list of type arguments used in the construction of this parameterized type.
Link copied to clipboard
@Nullable
open fun getComponentType(): TypeOf<out Any>
Returns the component type of the array type this object represents.
Link copied to clipboard
open fun getConcreteClass(): Class<T>
This returns the underlying, concrete Java java.lang.Class.
Link copied to clipboard
Fully Qualified name.
Link copied to clipboard
@Nullable
open fun getLowerBound(): TypeOf<out Any>
Returns the first declared lower-bound of the wildcard type expression represented by this type.
Link copied to clipboard
Returns an object that represents the type from which this parameterized type was constructed.
Link copied to clipboard
open fun getSimpleName(): String
Simple name.
Link copied to clipboard
@Nullable
open fun getUpperBound(): TypeOf<out Any>
Returns the first declared upper-bound of the wildcard type expression represented by this type.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isArray(): Boolean
Queries whether this object represents an array, generic or otherwise.
Link copied to clipboard
Is this type assignable from the given type?
Link copied to clipboard
Queries whether this object represents a parameterized type.
Link copied to clipboard
open fun isPublic(): Boolean
Queries whether the type represented by this object is public (isPublic).
Link copied to clipboard
open fun isSimple(): Boolean
Queries whether this object represents a simple (non-composite) type, not an array and not a generic type.
Link copied to clipboard
open fun isSynthetic(): Boolean
Queries whether this object represents a synthetic type as defined by isSynthetic.
Link copied to clipboard
open fun isWildcard(): Boolean
Queries whether this object represents a wildcard type expression, such as ?, ? extends Number, or ? super Integer.
Link copied to clipboard
open fun parameterizedTypeOf(parameterizedType: TypeOf<out Any>, typeArguments: Array<TypeOf<out Any>>): TypeOf<out Any>
Constructs a new parameterized type from a given parameterized type definition and an array of type arguments.
Link copied to clipboard
Link copied to clipboard
open fun <T> typeOf(type: Class<T>): TypeOf<T>
Creates an instance of TypeOf for the given Class.
open fun <T> typeOf(type: Type): TypeOf<T>
Creates an instance of TypeOf for the given Type.