Class ChildClassDefiner

  • All Implemented Interfaces:
    ClassDefiner

    final class ChildClassDefiner
    extends java.lang.Object
    implements ClassDefiner
    ClassDefiner that defines classes using child ClassLoaders.
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • ChildClassDefiner

        ChildClassDefiner()
    • Method Detail

      • define

        public java.lang.Class<?> define​(java.lang.Class<?> hostClass,
                                         byte[] bytecode)
                                  throws java.lang.Exception
        Description copied from interface: ClassDefiner
        Defines a new class relative to the host.
        Specified by:
        define in interface ClassDefiner
        Throws:
        java.lang.Exception
      • doPrivileged

        static <T> T doPrivileged​(java.security.PrivilegedAction<T> action)
        Utility method to remove doPrivileged ambiguity
      • childLoader

        static ChildClassDefiner.ChildLoader childLoader​(java.lang.ClassLoader hostLoader)
        Creates a child loader for the given host loader