/**@class java.lang.Class implements java.io.Serializable implements java.lang.reflect.AnnotatedElement implements java.lang.reflect.GenericDeclaration implements java.lang.reflect.Type @extends java.lang.Object 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 {@code Class} instances: those representing real classes and interfaces, those representing primitive types, and those representing array classes. <h4>Class instances representing object types (classes or interfaces)</h4> <p> These represent an ordinary class or interface as found in the class hierarchy. The name associated with these {@code 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 <em>descriptor</em>, 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). </p> <h4>Classes representing primitive types</h4> <p> These represent the standard Java primitive types and hence share their names (for example "int" for the {@code int} primitive type). Although it is not possible to create new instances based on these {@code Class} instances, they are still useful for providing reflection information, and as the component type of array classes. There is one {@code Class} instance for each primitive type, and their descriptors are: </p> <ul> <li>{@code B} representing the {@code byte} primitive type</li> <li>{@code S} representing the {@code short} primitive type</li> <li>{@code I} representing the {@code int} primitive type</li> <li>{@code J} representing the {@code long} primitive type</li> <li>{@code F} representing the {@code float} primitive type</li> <li>{@code D} representing the {@code double} primitive type</li> <li>{@code C} representing the {@code char} primitive type</li> <li>{@code Z} representing the {@code boolean} primitive type</li> <li>{@code V} representing void function return values</li> </ul> <p> <h4>Classes representing array classes</h4> <p> These represent the classes of Java arrays. There is one such {@code Class} instance per combination of array leaf component type and arity (number of dimensions). In this case, the name associated with the {@code 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 {@code Class} representing an array type is the same as its name. Examples of array class descriptors are: </p> <ul> <li>{@code [I} representing the {@code int[]} type</li> <li>{@code [Ljava/lang/String;} representing the {@code String[]} type</li> <li>{@code [[[C} representing the {@code char[][][]} type (three dimensions!)</li> </ul> */ var Class = { /**Returns a {@code Class} object which represents the class with the given name. The name should be the name of a non-primitive class, as described in the {@link java.lang.Class class definition}. Primitive types can not be found using this method; use {@code int.class} or {@code Integer.TYPE} instead. <p>If the class has not yet been loaded, it is loaded and initialized first. This is done through either the class loader of the calling class or one of its parent class loaders. It is possible that a static initializer is run as a result of this call. @throws ClassNotFoundException if the requested class cannot be found. @throws LinkageError if an error occurs during linkage @throws ExceptionInInitializerError if an exception occurs during static initialization of a class. */ forName : function( ) {}, /**Returns a {@code Class} object which represents the class with the given name. The name should be the name of a non-primitive class, as described in the {@link java.lang.Class class definition}. Primitive types can not be found using this method; use {@code int.class} or {@code Integer.TYPE} instead. <p>If the class has not yet been loaded, it is loaded first, using the given class loader. If the class has not yet been initialized and {@code shouldInitialize} is true, the class will be initialized. <p>If the provided {@code classLoader} is {@code null}, the bootstrap class loader will be used to load the class. @throws ClassNotFoundException if the requested class cannot be found. @throws LinkageError if an error occurs during linkage @throws ExceptionInInitializerError if an exception occurs during static initialization of a class. */ forName : function( ) {}, /**Returns an array containing {@code Class} objects for all public classes, interfaces, enums and annotations that are members of this class and its superclasses. This does not include classes of implemented interfaces. If there are no such class members or if this object represents a primitive type then an array of length 0 is returned. */ getClasses : function( ) {}, /** */ getAnnotation : function( ) {}, /**Returns an array containing all the annotations of this class. If there are no annotations then an empty array is returned. @see #getDeclaredAnnotations() */ getAnnotations : function( ) {}, /**Returns the canonical name of this class. If this class does not have a canonical name as defined in the Java Language Specification, then the method returns {@code null}. */ getCanonicalName : function( ) {}, /**Returns the class loader which was used to load the class represented by this {@code Class}. Implementations are free to return {@code null} for classes that were loaded by the bootstrap class loader. The Android reference implementation, though, always returns a reference to an actual class loader. */ getClassLoader : function( ) {}, /**Returns a {@code Class} object which represents the component type if this class represents an array type. Returns {@code null} if this class does not represent an array type. The component type of an array type is the type of the elements of the array. */ getComponentType : function( ) {}, /**Returns the dex file from which this class was loaded. @hide */ getDex : function( ) {}, /**Returns a string from the dex cache, computing the string from the dex file if necessary. @hide */ getDexCacheString : function( ) {}, /**Returns a resolved type from the dex cache, computing the type from the dex file if necessary. @hide */ getDexCacheType : function( ) {}, /**Returns a {@code Constructor} object which represents the public constructor matching the given parameter types. {@code (Class[]) null} is equivalent to the empty array. @throws NoSuchMethodException if the constructor cannot be found. @see #getDeclaredConstructor(Class[]) */ getConstructor : function( ) {}, /**Returns a {@code Constructor} object which represents the constructor matching the specified parameter types that is declared by the class represented by this {@code Class}. {@code (Class[]) null} is equivalent to the empty array. @throws NoSuchMethodException if the requested constructor cannot be found. @see #getConstructor(Class[]) */ getDeclaredConstructor : function( ) {}, /**Returns an array containing {@code Constructor} objects for all public constructors for this {@code Class}. If there are no public constructors or if this {@code Class} represents an array class, a primitive type or void then an empty array is returned. @see #getDeclaredConstructors() */ getConstructors : function( ) {}, /**Returns an array containing {@code Constructor} objects for all constructors declared in the class represented by this {@code Class}. If there are no constructors or if this {@code Class} represents an array class, a primitive type or void then an empty array is returned. @see #getConstructors() */ getDeclaredConstructors : function( ) {}, /**Returns a {@code Method} object which represents the method matching the specified name and parameter types that is declared by the class represented by this {@code Class}. @param {String} name the requested method's name. @param {Object {java.lang.Class[]}} parameterTypes the parameter types of the requested method. {@code (Class[]) null} is equivalent to the empty array. @return {Object {java.lang.reflect.Method}} the method described by {@code name} and {@code parameterTypes}. @throws NoSuchMethodException if the requested constructor cannot be found. @throws NullPointerException if {@code name} is {@code null}. @see #getMethod(String, Class[]) */ getDeclaredMethod : function( ) {}, /**Returns a {@code Method} object which represents the public method with the specified name and parameter types. {@code (Class[]) null} is equivalent to the empty array. This method first searches the class C represented by this {@code Class}, then the superclasses of C and finally the interfaces implemented by C and finally the superclasses of C for a method with matching name. @throws NoSuchMethodException if the method cannot be found. @see #getDeclaredMethod(String, Class[]) */ getMethod : function( ) {}, /**Returns an array containing {@code Method} objects for all methods declared in the class represented by this {@code Class}. If there are no methods or if this {@code Class} represents an array class, a primitive type or void then an empty array is returned. @see #getMethods() */ getDeclaredMethods : function( ) {}, /**Populates a list of methods without performing any security or type resolution checks first. If no methods exist, the list is not modified. @param {Boolean} publicOnly Whether to return only public methods. @hide */ getDeclaredMethodsUnchecked : function( ) {}, /**Returns an array containing {@code Method} objects for all public methods for the class C represented by this {@code Class}. Methods may be declared in C, the interfaces it implements or in the superclasses of C. The elements in the returned array are in no particular order. <p>If there are no public methods or if this {@code Class} represents a primitive type or {@code void} then an empty array is returned. @see #getDeclaredMethods() */ getMethods : function( ) {}, /**Returns the annotations that are directly defined on the class represented by this {@code Class}. Annotations that are inherited are not included in the result. If there are no annotations at all, an empty array is returned. @see #getAnnotations() */ getDeclaredAnnotations : function( ) {}, /**Returns an array containing {@code Class} objects for all classes, interfaces, enums and annotations that are members of this class. */ getDeclaredClasses : function( ) {}, /**Returns a {@code Field} object for the field with the given name which is declared in the class represented by this {@code Class}. @throws NoSuchFieldException if the requested field can not be found. @see #getField(String) */ getDeclaredField : function( ) {}, /**Returns an array containing {@code Field} objects for all fields declared in the class represented by this {@code Class}. If there are no fields or if this {@code Class} represents an array class, a primitive type or void then an empty array is returned. @see #getFields() */ getDeclaredFields : function( ) {}, /**Populates a list of fields without performing any security or type resolution checks first. If no fields exist, the list is not modified. @param {Boolean} publicOnly Whether to return only public fields. @hide */ getDeclaredFieldsUnchecked : function( ) {}, /**Returns the class that this class is a member of, or {@code null} if this class is a top-level class, a primitive, an array, or defined within a method or constructor. */ getDeclaringClass : function( ) {}, /**Returns the class enclosing this class. For most classes this is the same as the {@link #getDeclaringClass() declaring class}. For classes defined within a method or constructor (typically anonymous inner classes), this is the declaring class of that member. */ getEnclosingClass : function( ) {}, /**Returns the enclosing {@code Constructor} of this {@code Class}, if it is an anonymous or local/automatic class; otherwise {@code null}. */ getEnclosingConstructor : function( ) {}, /**Returns the enclosing {@code Method} of this {@code Class}, if it is an anonymous or local/automatic class; otherwise {@code null}. */ getEnclosingMethod : function( ) {}, /**Returns the {@code enum} constants associated with this {@code Class}. Returns {@code null} if this {@code Class} does not represent an {@code enum} type. */ getEnumConstants : function( ) {}, /**Returns a {@code Field} object which represents the public field with the given name. This method first searches the class C represented by this {@code Class}, then the interfaces implemented by C and finally the superclasses of C. @throws NoSuchFieldException if the field cannot be found. @see #getDeclaredField(String) */ getField : function( ) {}, /**Returns an array containing {@code Field} objects for all public fields for the class C represented by this {@code Class}. Fields may be declared in C, the interfaces it implements or in the superclasses of C. The elements in the returned array are in no particular order. <p>If there are no public fields or if this class represents an array class, a primitive type or {@code void} then an empty array is returned. @see #getDeclaredFields() */ getFields : function( ) {}, /**Returns the {@link Type}s of the interfaces that this {@code Class} directly implements. If the {@code Class} represents a primitive type or {@code void} then an empty array is returned. */ getGenericInterfaces : function( ) {}, /**Returns the {@code Type} that represents the superclass of this {@code class}. */ getGenericSuperclass : function( ) {}, /**Returns an array of {@code Class} objects that match the interfaces in the {@code implements} declaration of the class represented by this {@code Class}. The order of the elements in the array is identical to the order in the original class declaration. If the class does not implement any interfaces, an empty array is returned. <p>This method only returns directly-implemented interfaces, and does not include interfaces implemented by superclasses or superinterfaces of any implemented interfaces. */ getInterfaces : function( ) {}, /**Returns an integer that represents the modifiers of the class represented by this {@code Class}. The returned value is a combination of bits defined by constants in the {@link Modifier} class. */ getModifiers : function( ) {}, /**Returns the name of the class represented by this {@code Class}. For a description of the format which is used, see the class definition of {@link java.lang.Class}. */ getName : function( ) {}, /**Returns the simple name of the class represented by this {@code Class} as defined in the source code. If there is no name (that is, the class is anonymous) then an empty string is returned. If the receiver is an array then the name of the underlying type with square braces appended (for example {@code "Integer[]"}) is returned. @return {String} the simple name of the class represented by this {@code Class}. */ getSimpleName : function( ) {}, /**Returns {@code null}. */ getProtectionDomain : function( ) {}, /**Returns the URL of the given resource, or {@code null} if the resource is not found. The mapping between the resource name and the URL is managed by the class' class loader. @see ClassLoader */ getResource : function( ) {}, /**Returns a read-only stream for the contents of the given resource, or {@code null} if the resource is not found. The mapping between the resource name and the stream is managed by the class' class loader. @see ClassLoader */ getResourceAsStream : function( ) {}, /**Returns {@code null}. (On Android, a {@code ClassLoader} can load classes from multiple dex files. All classes from any given dex file will have the same signers, but different dex files may have different signers. This does not fit well with the original {@code ClassLoader}-based model of {@code getSigners}.) */ getSigners : function( ) {}, /**Returns the {@code Class} object which represents the superclass of the class represented by this {@code Class}. If this {@code Class} represents the {@code Object} class, a primitive type, an interface or void then the method returns {@code null}. If this {@code Class} represents an array class then the {@code Object} class is returned. */ getSuperclass : function( ) {}, /**Returns an array containing {@code TypeVariable} objects for type variables declared by the generic class represented by this {@code Class}. Returns an empty array if the class is not generic. */ getTypeParameters : function( ) {}, /**Tests whether this {@code Class} represents an annotation class. */ isAnnotation : function( ) {}, /** */ isAnnotationPresent : function( ) {}, /**Tests whether the class represented by this {@code Class} is anonymous. */ isAnonymousClass : function( ) {}, /**Tests whether the class represented by this {@code Class} is an array class. */ isArray : function( ) {}, /**Is this a runtime created proxy class? @hide */ isProxy : function( ) {}, /**Can {@code c} be assigned to this class? For example, String can be assigned to Object (by an upcast), however, an Object cannot be assigned to a String as a potentially exception throwing downcast would be necessary. Similarly for interfaces, a class that implements (or an interface that extends) another can be assigned to its parent, but not vice-versa. All Classes may assign to themselves. Classes for primitive types may not assign to each other. @param {Object {java.lang.Class}} c the class to check. @return {Boolean} {@code true} if {@code c} can be assigned to the class represented by this {@code Class}; {@code false} otherwise. @throws NullPointerException if {@code c} is {@code null}. */ isAssignableFrom : function( ) {}, /**Tests whether the class represented by this {@code Class} is an {@code enum}. */ isEnum : function( ) {}, /**Tests whether the given object can be cast to the class represented by this {@code Class}. This is the runtime version of the {@code instanceof} operator. @return {Boolean} {@code true} if {@code object} can be cast to the type represented by this {@code Class}; {@code false} if {@code object} is {@code null} or cannot be cast. */ isInstance : function( ) {}, /**Tests whether this {@code Class} represents an interface. */ isInterface : function( ) {}, /**Tests whether the class represented by this {@code Class} is defined locally. */ isLocalClass : function( ) {}, /**Tests whether the class represented by this {@code Class} is a member class. */ isMemberClass : function( ) {}, /**Tests whether this {@code Class} represents a primitive type. */ isPrimitive : function( ) {}, /**Tests whether this {@code Class} represents a synthetic type. */ isSynthetic : function( ) {}, /**Indicates whether this {@code Class} or its parents override finalize. @hide */ isFinalizable : function( ) {}, /**Returns a new instance of the class represented by this {@code Class}, created by invoking the default (that is, zero-argument) constructor. If there is no such constructor, or if the creation fails (either because of a lack of available memory or because an exception is thrown by the constructor), an {@code InstantiationException} is thrown. If the default constructor exists but is not accessible from the context where this method is invoked, an {@code IllegalAccessException} is thrown. @throws IllegalAccessException if the default constructor is not visible. @throws InstantiationException if the instance cannot be created. */ newInstance : function( ) {}, /** */ toString : function( ) {}, /**Returns the {@code Package} of which the class represented by this {@code Class} is a member. Returns {@code null} if no {@code Package} object was created by the class loader of the class. */ getPackage : function( ) {}, /**Returns the package name of this class. This returns {@code null} for classes in the default package. @hide */ getPackageName$ : function( ) {}, /**Returns the assertion status for the class represented by this {@code Class}. Assertion is enabled / disabled based on the class loader, package or class default at runtime. */ desiredAssertionStatus : function( ) {}, /**Casts this {@code Class} to represent a subclass of the given class. If successful, this {@code Class} is returned; otherwise a {@code ClassCastException} is thrown. @throws ClassCastException if this {@code Class} cannot be cast to the given type. */ asSubclass : function( ) {}, /**Casts the given object to the type represented by this {@code Class}. If the object is {@code null} then the result is also {@code null}. @throws ClassCastException if the object cannot be cast to the given type. */ cast : function( ) {}, /**The class def of this class in its own Dex, or -1 if there is no class def. @hide */ getDexClassDefIndex : function( ) {}, /**The type index of this class in its own Dex, or -1 if it is unknown. If a class is referenced by multiple Dex files, it will have a different type index in each. Dex files support 65534 type indices, with 65535 representing no index. @hide */ getDexTypeIndex : function( ) {}, /**The annotation directory offset of this class in its own Dex, or 0 if it is unknown. TODO: 0 is a sentinel that means 'no annotations directory'; this should be -1 if unknown @hide */ getDexAnnotationDirectoryOffset : function( ) {}, };