Share via


ITypeVariable Interface

Definition

TypeVariable is the common superinterface for type variables of kinds.

[Android.Runtime.Register("java/lang/reflect/TypeVariable", "", "Java.Lang.Reflect.ITypeVariableInvoker")]
[Java.Interop.JavaTypeParameters(new System.String[] { "D extends java.lang.reflect.GenericDeclaration" })]
public interface ITypeVariable : IDisposable, Java.Interop.IJavaPeerable, Java.Lang.Reflect.IType
[<Android.Runtime.Register("java/lang/reflect/TypeVariable", "", "Java.Lang.Reflect.ITypeVariableInvoker")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "D extends java.lang.reflect.GenericDeclaration" })>]
type ITypeVariable = interface
    interface IType
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

TypeVariable is the common superinterface for type variables of kinds. A type variable is created the first time it is needed by a reflective method, as specified in this package. If a type variable t is referenced by a type (i.e, class, interface or annotation type) T, and T is declared by the nth enclosing class of T (see JLS 8.1.2), then the creation of t requires the resolution (see JVMS 5) of the ith enclosing class of T, for i = 0 to n, inclusive. Creating a type variable must not cause the creation of its bounds. Repeated creation of a type variable has no effect.

Multiple objects may be instantiated at run-time to represent a given type variable. Even though a type variable is created only once, this does not imply any requirement to cache instances representing the type variable. However, all instances representing a type variable must be equal() to each other. As a consequence, users of type variables must not rely on the identity of instances of classes implementing this interface.

Added in 1.5.

Java documentation for java.lang.reflect.TypeVariable.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

GenericDeclaration

Returns the language construct that declares this type variable.

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
Name

Returns the name of this type variable as it is specified in source code.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
TypeName

Returns a string describing this type, including information about any type parameters.

(Inherited from IType)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetBounds()

Returns an array of Type objects representing the upper bound(s) of this type variable.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to