Java.Lang.Class Class
The in-memory representation of a Java class.

See Also: Class Members

Syntax

[Android.Runtime.Register("java/lang/Class", DoNotGenerateAcw=true)]
public sealed class Class : Object, Java.IO.ISerializable, Java.Lang.Reflect.IGenericDeclaration, Java.Lang.Reflect.IType, IDisposable

Remarks

The in-memory representation of a Java class. This representation serves as the starting point for querying class-related information, a process usually called "reflection". There are basically three types of Class instances: those representing real classes and interfaces, those representing primitive types, and those representing array classes.

Class instances representing object types (classes or interfaces)

These represent an ordinary class or interface as found in the class hierarchy. The name associated with these Class instances is simply the fully qualified class name of the class or interface that it represents. In addition to this human-readable name, each class is also associated by a so-called descriptor, which is the letter "L", followed by the class name and a semicolon (";"). The descriptor is what the runtime system uses internally for identifying the class (for example in a DEX file).

Classes representing primitive types

These represent the standard Java primitive types and hence share their names (for example "int" for the int primitive type). Although it is not possible to create new instances based on these Class instances, they are still useful for providing reflection information, and as the component type of array classes. There is one Class instance for each primitive type, and their descriptors are:

Classes representing array classes

These represent the classes of Java arrays. There is one such Class instance per combination of array leaf component type and arity (number of dimensions). In this case, the name associated with the Class consists of one or more left square brackets (one per dimension in the array) followed by the descriptor of the class representing the leaf component type, which can be either an object type or a primitive type. The descriptor of a Class representing an array type is the same as its name. Examples of array class descriptors are:

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1