Class RuntimeEnhancer

java.lang.Object
org.datanucleus.enhancer.RuntimeEnhancer

public class RuntimeEnhancer extends Object
Class that will enhance a class at runtime, called via "javaagent".
  • Field Details

  • Constructor Details

    • RuntimeEnhancer

      public RuntimeEnhancer(String api, Map contextProps)
      Constructor for a runtime enhancer for an API. Creates its own NucleusContext for enhancement. Note that this is because the NucleusContext currently is for runtime or enhancement, so we isolate things; in future we could take in the NucleusContext from whatever operation has it (e.g PMF, EMF).
      Parameters:
      api - The API
      contextProps - Properties for use by the NucleusContext (e.g ClassLoaderResolver class name, pluginRegistry).
  • Method Details

    • setClassEnhancerOption

      public void setClassEnhancerOption(String optionName)
    • unsetClassEnhancerOption

      public void unsetClassEnhancerOption(String optionName)
    • enhance

      public byte[] enhance(String className, byte[] classdefinition, ClassLoader loader)