Package org.apache.openjpa.util.asm
Class EnhancementProject
java.lang.Object
org.apache.openjpa.util.asm.EnhancementProject
Keep track of classes under enhancement.
- Author:
- Mark Struberg
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsClass
(String type) Return true if the project already contains the given class.loadClass
(byte[] bytes, ClassLoader loader) Load a class with the given type.Load a class with the given name.loadClass
(String name, ClassLoader loader) Load the bytecode for the class with the given name.
-
Constructor Details
-
EnhancementProject
public EnhancementProject()
-
-
Method Details
-
containsClass
Return true if the project already contains the given class. -
loadClass
Load a class with the given name.- Parameters:
name
- the fully qualified class name- See Also:
-
loadClass
Load a class with the given type.- See Also:
-
loadClass
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:
RuntimeException
- on parse error
-
loadClass
-
clear
public void clear()
-