JML

java.lang
Class Class

java.lang.Object
  extended byjava.lang.Class
All Implemented Interfaces:
AnnotatedElement, GenericDeclaration, Serializable, Type

public final class Class
extends Object
implements Serializable, GenericDeclaration, Type, AnnotatedElement


Nested Class Summary
private static class Class.EnclosingMethodInfo
           
(package private) static class Class.MethodArray
           
 
Field Summary
private static ProtectionDomain allPermDomain
           
private static int ANNOTATION
           
private  Map annotations
           
private  sun.reflect.annotation.AnnotationType annotationType
           
private  Constructor cachedConstructor
           
private  int classRedefinedCount
           
private  Map declaredAnnotations
           
private  SoftReference declaredConstructors
           
private  SoftReference declaredFields
           
private  SoftReference declaredMethods
           
private  SoftReference declaredPublicFields
           
private  SoftReference declaredPublicMethods
           
private static Annotation[] EMPTY_ANNOTATIONS_ARRAY
           
private static int ENUM
           
private  Map enumConstantDirectory
           
private  Object[] enumConstants
           
private  sun.reflect.generics.repository.ClassRepository genericInfo
           
private static boolean initted
           
private  int lastRedefinedCount
           
private  String name
           
private  Class newInstanceCallerCache
           
private  SoftReference publicConstructors
           
private  SoftReference publicFields
           
private  SoftReference publicMethods
           
private static sun.reflect.ReflectionFactory reflectionFactory
           
private static ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
private static int SYNTHETIC
           
private static boolean useCaches
           
 
Constructor Summary
private Class()
           
 
Method Summary
private static void addAll(Collection, Field[])
           
private static String argumentTypesToString(Class[])
           
private static boolean arrayContentsEq(Object[], Object[])
           
 Class asSubclass(Class)
           
 Object cast(Object)
           
private static void checkInitted()
           
private  void checkMemberAccess(int, ClassLoader)
           
private  void clearCachesOnClassRedefinition()
           
private static Constructor[] copyConstructors(Constructor[])
           
private static Field[] copyFields(Field[])
           
private static Method[] copyMethods(Method[])
           
 boolean desiredAssertionStatus()
           
private static boolean desiredAssertionStatus0(Class)
           
(package private)  Map enumConstantDirectory()
           
static Class forName(String)
           
static Class forName(String, boolean, ClassLoader)
           
private static Class forName0(String, boolean, ClassLoader)
           
 Annotation getAnnotation(Class)
           
 Annotation[] getAnnotations()
           
(package private)  sun.reflect.annotation.AnnotationType getAnnotationType()
           
 String getCanonicalName()
           
 Class[] getClasses()
           
 ClassLoader getClassLoader()
           
(package private)  ClassLoader getClassLoader0()
           
 Class getComponentType()
           
(package private)  sun.reflect.ConstantPool getConstantPool()
           
 Constructor getConstructor(Class[])
           
private  Constructor getConstructor0(Class[], int)
           
 Constructor[] getConstructors()
           
 Annotation[] getDeclaredAnnotations()
           
 Class[] getDeclaredClasses()
           
private  Class[] getDeclaredClasses0()
           
 Constructor getDeclaredConstructor(Class[])
           
 Constructor[] getDeclaredConstructors()
           
private  Constructor[] getDeclaredConstructors0(boolean)
           
 Field getDeclaredField(String)
           
 Field[] getDeclaredFields()
           
private  Field[] getDeclaredFields0(boolean)
           
 Method getDeclaredMethod(String, Class[])
           
 Method[] getDeclaredMethods()
           
private  Method[] getDeclaredMethods0(boolean)
           
 Class getDeclaringClass()
           
 Class getEnclosingClass()
           
 Constructor getEnclosingConstructor()
           
 Method getEnclosingMethod()
           
private  Object[] getEnclosingMethod0()
           
private  Class.EnclosingMethodInfo getEnclosingMethodInfo()
           
 Object[] getEnumConstants()
           
(package private)  Object[] getEnumConstantsShared()
           
private  sun.reflect.generics.factory.GenericsFactory getFactory()
           
 Field getField(String)
           
private  Field getField0(String)
           
 Field[] getFields()
           
private  sun.reflect.generics.repository.ClassRepository getGenericInfo()
           
 Type[] getGenericInterfaces()
           
private  String getGenericSignature()
           
 Type getGenericSuperclass()
           
 Class[] getInterfaces()
           
 Method getMethod(String, Class[])
           
private  Method getMethod0(String, Class[])
           
 Method[] getMethods()
           
 int getModifiers()
           
 String getName()
           
private  String getName0()
           
 Package getPackage()
           
(package private) static Class getPrimitiveClass(String)
           
 ProtectionDomain getProtectionDomain()
           
private  ProtectionDomain getProtectionDomain0()
           
private  byte[] getRawAnnotations()
           
private static sun.reflect.ReflectionFactory getReflectionFactory()
           
 URL getResource(String)
           
 InputStream getResourceAsStream(String)
           
 Object[] getSigners()
           
private  String getSimpleBinaryName()
           
 String getSimpleName()
           
 Class getSuperclass()
           
 TypeVariable[] getTypeParameters()
           
private  void initAnnotationsIfNecessary()
           
 boolean isAnnotation()
           
 boolean isAnnotationPresent(Class)
           
 boolean isAnonymousClass()
           
 boolean isArray()
           
private static boolean isAsciiDigit(char)
           
 boolean isAssignableFrom(Class)
           
 boolean isEnum()
           
 boolean isInstance(Object)
           
 boolean isInterface()
           
 boolean isLocalClass()
           
private  boolean isLocalOrAnonymousClass()
           
 boolean isMemberClass()
           
 boolean isPrimitive()
           
 boolean isSynthetic()
           
 Object newInstance()
           
private  Object newInstance0()
           
private  Constructor[] privateGetDeclaredConstructors(boolean)
           
private  Field[] privateGetDeclaredFields(boolean)
           
private  Method[] privateGetDeclaredMethods(boolean)
           
private  Field[] privateGetPublicFields(Set)
           
private  Method[] privateGetPublicMethods()
           
private static void registerNatives()
           
private  String resolveName(String)
           
private  Field searchFields(Field[], String)
           
private static Method searchMethods(Method[], String, Class[])
           
(package private)  void setAnnotationType(sun.reflect.annotation.AnnotationType)
           
(package private)  void setProtectionDomain0(ProtectionDomain)
           
(package private)  void setSigners(Object[])
           
private static Class toClass(Type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reflectionFactory

private static sun.reflect.ReflectionFactory reflectionFactory

enumConstantDirectory

private transient volatile Map enumConstantDirectory

serialPersistentFields

private static final ObjectStreamField[] serialPersistentFields

name

private transient String name

declaredConstructors

private transient volatile SoftReference declaredConstructors

ANNOTATION

private static final int ANNOTATION

cachedConstructor

private transient volatile Constructor cachedConstructor

lastRedefinedCount

private transient volatile int lastRedefinedCount

declaredFields

private transient volatile SoftReference declaredFields

annotations

private transient Map annotations

initted

private static boolean initted

genericInfo

private transient sun.reflect.generics.repository.ClassRepository genericInfo

declaredPublicMethods

private transient volatile SoftReference declaredPublicMethods

ENUM

private static final int ENUM

enumConstants

private transient volatile Object[] enumConstants

serialVersionUID

private static final long serialVersionUID

declaredMethods

private transient volatile SoftReference declaredMethods

publicFields

private transient volatile SoftReference publicFields

allPermDomain

private static ProtectionDomain allPermDomain

annotationType

private sun.reflect.annotation.AnnotationType annotationType

classRedefinedCount

private transient volatile int classRedefinedCount

SYNTHETIC

private static final int SYNTHETIC

declaredAnnotations

private transient Map declaredAnnotations

publicConstructors

private transient volatile SoftReference publicConstructors

useCaches

private static boolean useCaches

newInstanceCallerCache

private transient volatile Class newInstanceCallerCache

publicMethods

private transient volatile SoftReference publicMethods

EMPTY_ANNOTATIONS_ARRAY

private static Annotation[] EMPTY_ANNOTATIONS_ARRAY

declaredPublicFields

private transient volatile SoftReference declaredPublicFields
Constructor Detail

Class

private Class()
Method Detail

registerNatives

private static void registerNatives()

toString

public String toString()
Overrides:
toString in class Object

forName

public static Class forName(String)
                     throws ClassNotFoundException
Throws:
ClassNotFoundException

forName

public static Class forName(String,
                            boolean,
                            ClassLoader)
                     throws ClassNotFoundException
Throws:
ClassNotFoundException

forName0

private static Class forName0(String,
                              boolean,
                              ClassLoader)
                       throws ClassNotFoundException
Throws:
ClassNotFoundException

newInstance

public Object newInstance()
                   throws InstantiationException,
                          IllegalAccessException
Throws:
InstantiationException
IllegalAccessException

newInstance0

private Object newInstance0()
                     throws InstantiationException,
                            IllegalAccessException
Throws:
InstantiationException
IllegalAccessException

isInstance

public boolean isInstance(Object)

isAssignableFrom

public boolean isAssignableFrom(Class)

isInterface

public boolean isInterface()

isArray

public boolean isArray()

isPrimitive

public boolean isPrimitive()

isAnnotation

public boolean isAnnotation()

isSynthetic

public boolean isSynthetic()

getName

public String getName()

getName0

private String getName0()

getClassLoader

public ClassLoader getClassLoader()

getClassLoader0

ClassLoader getClassLoader0()

getTypeParameters

public TypeVariable[] getTypeParameters()
Specified by:
getTypeParameters in interface GenericDeclaration

getSuperclass

public Class getSuperclass()

getGenericSuperclass

public Type getGenericSuperclass()

getPackage

public Package getPackage()

getInterfaces

public Class[] getInterfaces()

getGenericInterfaces

public Type[] getGenericInterfaces()

getComponentType

public Class getComponentType()

getModifiers

public int getModifiers()

getSigners

public Object[] getSigners()

setSigners

void setSigners(Object[])

getEnclosingMethod

public Method getEnclosingMethod()

getEnclosingMethod0

private Object[] getEnclosingMethod0()

getEnclosingMethodInfo

private Class.EnclosingMethodInfo getEnclosingMethodInfo()

toClass

private static Class toClass(Type)

getEnclosingConstructor

public Constructor getEnclosingConstructor()

getDeclaringClass

public Class getDeclaringClass()

getEnclosingClass

public Class getEnclosingClass()

getSimpleName

public String getSimpleName()

isAsciiDigit

private static boolean isAsciiDigit(char)

getCanonicalName

public String getCanonicalName()

isAnonymousClass

public boolean isAnonymousClass()

isLocalClass

public boolean isLocalClass()

isMemberClass

public boolean isMemberClass()

getSimpleBinaryName

private String getSimpleBinaryName()

isLocalOrAnonymousClass

private boolean isLocalOrAnonymousClass()

getClasses

public Class[] getClasses()

getFields

public Field[] getFields()
                  throws SecurityException
Throws:
SecurityException

getMethods

public Method[] getMethods()
                    throws SecurityException
Throws:
SecurityException

getConstructors

public Constructor[] getConstructors()
                              throws SecurityException
Throws:
SecurityException

getField

public Field getField(String)
               throws NoSuchFieldException,
                      SecurityException
Throws:
NoSuchFieldException
SecurityException

getMethod

public transient Method getMethod(String,
                                  Class[])
                           throws NoSuchMethodException,
                                  SecurityException
Throws:
NoSuchMethodException
SecurityException

getConstructor

public transient Constructor getConstructor(Class[])
                                     throws NoSuchMethodException,
                                            SecurityException
Throws:
NoSuchMethodException
SecurityException

getDeclaredClasses

public Class[] getDeclaredClasses()
                           throws SecurityException
Throws:
SecurityException

getDeclaredFields

public Field[] getDeclaredFields()
                          throws SecurityException
Throws:
SecurityException

getDeclaredMethods

public Method[] getDeclaredMethods()
                            throws SecurityException
Throws:
SecurityException

getDeclaredConstructors

public Constructor[] getDeclaredConstructors()
                                      throws SecurityException
Throws:
SecurityException

getDeclaredField

public Field getDeclaredField(String)
                       throws NoSuchFieldException,
                              SecurityException
Throws:
NoSuchFieldException
SecurityException

getDeclaredMethod

public transient Method getDeclaredMethod(String,
                                          Class[])
                                   throws NoSuchMethodException,
                                          SecurityException
Throws:
NoSuchMethodException
SecurityException

getDeclaredConstructor

public transient Constructor getDeclaredConstructor(Class[])
                                             throws NoSuchMethodException,
                                                    SecurityException
Throws:
NoSuchMethodException
SecurityException

getResourceAsStream

public InputStream getResourceAsStream(String)

getResource

public URL getResource(String)

getProtectionDomain

public ProtectionDomain getProtectionDomain()

getProtectionDomain0

private ProtectionDomain getProtectionDomain0()

setProtectionDomain0

void setProtectionDomain0(ProtectionDomain)

getPrimitiveClass

static Class getPrimitiveClass(String)

checkMemberAccess

private void checkMemberAccess(int,
                               ClassLoader)

resolveName

private String resolveName(String)

clearCachesOnClassRedefinition

private void clearCachesOnClassRedefinition()

getGenericSignature

private String getGenericSignature()

getFactory

private sun.reflect.generics.factory.GenericsFactory getFactory()

getGenericInfo

private sun.reflect.generics.repository.ClassRepository getGenericInfo()

getRawAnnotations

private byte[] getRawAnnotations()

getConstantPool

sun.reflect.ConstantPool getConstantPool()

privateGetDeclaredFields

private Field[] privateGetDeclaredFields(boolean)

privateGetPublicFields

private Field[] privateGetPublicFields(Set)

addAll

private static void addAll(Collection,
                           Field[])

privateGetDeclaredConstructors

private Constructor[] privateGetDeclaredConstructors(boolean)

privateGetDeclaredMethods

private Method[] privateGetDeclaredMethods(boolean)

privateGetPublicMethods

private Method[] privateGetPublicMethods()

searchFields

private Field searchFields(Field[],
                           String)

getField0

private Field getField0(String)
                 throws NoSuchFieldException
Throws:
NoSuchFieldException

searchMethods

private static Method searchMethods(Method[],
                                    String,
                                    Class[])

getMethod0

private Method getMethod0(String,
                          Class[])

getConstructor0

private Constructor getConstructor0(Class[],
                                    int)
                             throws NoSuchMethodException
Throws:
NoSuchMethodException

arrayContentsEq

private static boolean arrayContentsEq(Object[],
                                       Object[])

copyFields

private static Field[] copyFields(Field[])

copyMethods

private static Method[] copyMethods(Method[])

copyConstructors

private static Constructor[] copyConstructors(Constructor[])

getDeclaredFields0

private Field[] getDeclaredFields0(boolean)

getDeclaredMethods0

private Method[] getDeclaredMethods0(boolean)

getDeclaredConstructors0

private Constructor[] getDeclaredConstructors0(boolean)

getDeclaredClasses0

private Class[] getDeclaredClasses0()

argumentTypesToString

private static String argumentTypesToString(Class[])

desiredAssertionStatus

public boolean desiredAssertionStatus()

desiredAssertionStatus0

private static boolean desiredAssertionStatus0(Class)

isEnum

public boolean isEnum()

getReflectionFactory

private static sun.reflect.ReflectionFactory getReflectionFactory()

checkInitted

private static void checkInitted()

getEnumConstants

public Object[] getEnumConstants()

getEnumConstantsShared

Object[] getEnumConstantsShared()

enumConstantDirectory

Map enumConstantDirectory()

cast

public Object cast(Object)

asSubclass

public Class asSubclass(Class)

getAnnotation

public Annotation getAnnotation(Class)
Specified by:
getAnnotation in interface AnnotatedElement

isAnnotationPresent

public boolean isAnnotationPresent(Class)
Specified by:
isAnnotationPresent in interface AnnotatedElement

getAnnotations

public Annotation[] getAnnotations()
Specified by:
getAnnotations in interface AnnotatedElement

getDeclaredAnnotations

public Annotation[] getDeclaredAnnotations()
Specified by:
getDeclaredAnnotations in interface AnnotatedElement

initAnnotationsIfNecessary

private void initAnnotationsIfNecessary()

setAnnotationType

void setAnnotationType(sun.reflect.annotation.AnnotationType)

getAnnotationType

sun.reflect.annotation.AnnotationType getAnnotationType()

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.