@Incubating abstract class TypeOf<T : Any>
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
open fun equals(other: Any?): Boolean |
|
open fun getActualTypeArguments(): MutableList<TypeOf<*>>
Returns the list of type arguments used in the construction of this parameterized type. |
|
open fun getComponentType(): TypeOf<*>
Returns the component type of the array type this object represents. |
|
open fun getParameterizedTypeDefinition(): TypeOf<*>
Returns an object that represents the type from which this parameterized type was constructed. |
|
open fun getSimpleName(): String
Simple name. |
|
open fun getUpperBound(): TypeOf<*>
Returns the first declared upper-bound of the wildcard type expression represented by this type. |
|
open fun hashCode(): Int |
|
open fun isArray(): Boolean
Queries whether this object represents an array, generic or otherwise. |
|
fun isAssignableFrom(type: TypeOf<*>): Boolean fun isAssignableFrom(type: Type): Boolean
Is this type assignable from the given type? |
|
open fun isParameterized(): Boolean
Queries whether this object represents a parameterized type. |
|
open fun isPublic(): Boolean
Queries whether the type represented by this object is public ( |
|
open fun isSimple(): Boolean
Queries whether this object represents a simple (non-composite) type, not an array and not a generic type. |
|
open fun isSynthetic(): Boolean
Queries whether this object represents a synthetic type as defined by |
|
open fun isWildcard(): Boolean
Queries whether this object represents a wildcard type expression, such as |
|
open static fun parameterizedTypeOf(parameterizedType: TypeOf<*>, vararg typeArguments: TypeOf<*>): TypeOf<*>
Constructs a new parameterized type from a given parameterized type definition and an array of type arguments. For example, |
|
fun toString(): String |
|
open static fun <T : Any> typeOf(type: Class<T>): TypeOf<T>
Creates an instance of TypeOf for the given Class. open static fun <T : Any> typeOf(type: Type): TypeOf<T>
Creates an instance of TypeOf for the given Type. |