Class EnhancementProject


  • public class EnhancementProject
    extends java.lang.Object
    Keep track of classes under enhancement.
    Author:
    Mark Struberg
    • Constructor Detail

      • EnhancementProject

        public EnhancementProject()
    • 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,
                                          java.lang.ClassLoader loader)
        Load the bytecode for the class with the given name. If a ClassNodeTracker with the given name already exists in this project, it will be returned. Otherwise, a new ClassNodeTracker 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 package
        loader - 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()