org.codehaus.aspectwerkz.reflect.impl.javassist
Class JavassistClassInfoRepository

java.lang.Object
  extended byorg.codehaus.aspectwerkz.reflect.impl.javassist.JavassistClassInfoRepository

public class JavassistClassInfoRepository
extends Object

A repository for the class info hierarchy. Is class loader aware.

TODO refactor some with JavaClassInfoRepository but keep em separate for system runtime sake in AOPC (WLS)

Author:
Jonas Bonér

Method Summary
 void addClassInfo(ClassInfo classInfo)
          Adds a new class info.
 ClassInfo checkParentClassRepository(String className, ClassLoader loader)
          Searches for a class info up in the class loader hierarchy.
 ClassInfo getClassInfo(String className)
          Returns the class info.
static JavassistClassInfoRepository getRepository(ClassLoader loader)
          Returns the class info repository for the specific class loader
 boolean hasClassInfo(String name)
          Checks if the class info for a specific class exists.
 void removeClassInfo(javassist.CtClass clazz)
          Removes the class from the repository (since it has been modified and needs to be rebuild).
static void removeClassInfoFromAllClassLoaders(String className)
          Remove a class from the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRepository

public static JavassistClassInfoRepository getRepository(ClassLoader loader)
Returns the class info repository for the specific class loader

Parameters:
loader -
Returns:

removeClassInfoFromAllClassLoaders

public static void removeClassInfoFromAllClassLoaders(String className)
Remove a class from the repository.

Parameters:
className - the name of the class

getClassInfo

public ClassInfo getClassInfo(String className)
Returns the class info.

Parameters:
className -
Returns:

addClassInfo

public void addClassInfo(ClassInfo classInfo)
Adds a new class info.

Parameters:
classInfo -

hasClassInfo

public boolean hasClassInfo(String name)
Checks if the class info for a specific class exists.

Parameters:
name -
Returns:

checkParentClassRepository

public ClassInfo checkParentClassRepository(String className,
                                            ClassLoader loader)
Searches for a class info up in the class loader hierarchy.

Parameters:
className -
loader -
Returns:
the class info

removeClassInfo

public void removeClassInfo(javassist.CtClass clazz)
Removes the class from the repository (since it has been modified and needs to be rebuild).

Parameters:
clazz -


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.