Package org.apache.openjpa.util.asm
Class EnhancementProject
- java.lang.Object
-
- org.apache.openjpa.util.asm.EnhancementProject
-
public class EnhancementProject extends java.lang.Object
Keep track of classes under enhancement.- Author:
- Mark Struberg
-
-
Constructor Summary
Constructors Constructor Description EnhancementProject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsClass(java.lang.String type)
Return true if the project already contains the given class.ClassNodeTracker
loadClass(byte[] bytes, java.lang.ClassLoader loader)
ClassNodeTracker
loadClass(java.lang.Class<?> type)
Load a class with the given type.ClassNodeTracker
loadClass(java.lang.String name)
Load a class with the given name.ClassNodeTracker
loadClass(java.lang.String name, java.lang.ClassLoader loader)
Load the bytecode for the class with the given name.
-
-
-
Method Detail
-
containsClass
public boolean containsClass(java.lang.String type)
Return true if the project already contains the given class.
-
loadClass
public ClassNodeTracker loadClass(java.lang.String name)
Load a class with the given name.- Parameters:
name
- the fully qualified class name- See Also:
loadClass(String,ClassLoader)
-
loadClass
public ClassNodeTracker loadClass(java.lang.Class<?> type)
Load a class with the given type.- See Also:
loadClass(String,ClassLoader)
-
loadClass
public ClassNodeTracker loadClass(java.lang.String name, java.lang.ClassLoader loader)
Load the bytecode for the class with the given name. If aClassNodeTracker
with the given name already exists in this project, it will be returned. Otherwise, a newClassNodeTracker
will be created with the given name and returned. If the name represents an existing type, the returned instance will contain the parsed bytecode for that type. If the name is of a primitive or array type, the returned instance will act accordingly.- Parameters:
name
- the name of the class, including packageloader
- the class loader to use to search for an existing class with the given name; if null defaults to the context loader of the current thread- Throws:
java.lang.RuntimeException
- on parse error
-
loadClass
public ClassNodeTracker loadClass(byte[] bytes, java.lang.ClassLoader loader)
-
clear
public void clear()
-
-