org.codehaus.metaclass.introspector
Class MetaClassIntrospector

java.lang.Object
  extended byorg.codehaus.metaclass.introspector.MetaClassIntrospector

public final class MetaClassIntrospector
extends java.lang.Object

This class is responsible for loading and caching the ClassDescriptor objects for corresponding java classes. It serves a similar purpose as the java.beans.Introspector class does for Java Beans.

Version:
$Revision: 1.9 $ $Date: 2004/01/16 00:25:55 $
Author:
Peter Donald

Constructor Summary
MetaClassIntrospector()
           
 
Method Summary
static void clearCompleteCache()
          Flush all of the Introspector's internal caches.
static ClassDescriptor getClassDescriptor(java.lang.Class clazz)
           
static ClassDescriptor getClassDescriptor(java.lang.String classname, java.lang.ClassLoader classLoader)
           
static void setAccessor(MetaClassAccessor accessor)
          Set the MetaClassAccessor to use to locate ClassDescriptor objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaClassIntrospector

public MetaClassIntrospector()
Method Detail

clearCompleteCache

public static void clearCompleteCache()
Flush all of the Introspector's internal caches. This method is not normally required. It is normally only needed by advanced tools that update existing "Class" objects in-place and need to make the Introspector re-analyze existing Class objects.

Note that the caller must have been granted the "metaclass.clearCompleteCache" RuntimePermission or else a security exception will be thrown.

Throws:
java.lang.SecurityException - if the caller does not have permission to clear cache

setAccessor

public static void setAccessor(MetaClassAccessor accessor)
Set the MetaClassAccessor to use to locate ClassDescriptor objects.

Note that the caller must have been granted the "metaclass.setAccessor" RuntimePermission or else a security exception will be thrown.

Parameters:
accessor - the MetaClassAccessor
Throws:
java.lang.SecurityException - if the caller does not have permission to clear cache

getClassDescriptor

public static ClassDescriptor getClassDescriptor(java.lang.Class clazz)
                                          throws MetaClassException
Throws:
MetaClassException
See Also:
MetaClassAccessor.getClassDescriptor(java.lang.String, java.lang.ClassLoader, org.codehaus.metaclass.introspector.MetaClassAccessor)

getClassDescriptor

public static ClassDescriptor getClassDescriptor(java.lang.String classname,
                                                 java.lang.ClassLoader classLoader)
                                          throws MetaClassException
Throws:
MetaClassException
See Also:
MetaClassAccessor.getClassDescriptor(java.lang.String, java.lang.ClassLoader, org.codehaus.metaclass.introspector.MetaClassAccessor)


Copyright © 2003-2004 Codehaus. All Rights Reserved.