Class RuntimeEnhancer

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

      • 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).
        api - The API
        contextProps - Properties for use by the NucleusContext (e.g ClassLoaderResolver class name, pluginRegistry).
    • Method Detail

      • setClassEnhancerOption

        public void setClassEnhancerOption​(String optionName)
      • unsetClassEnhancerOption

        public void unsetClassEnhancerOption​(String optionName)
      • enhance

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