Class ClassDefining


  • public final class ClassDefining
    extends Object
    Entry-point for defining dynamically generated classes.
    Author:
    mcculls@gmail.com (Stuart McCulloch)
    • Method Detail

      • define

        public static Class<?> define​(Class<?> hostClass,
                                      byte[] bytecode)
                               throws Exception
        Defines a new class relative to the host.
        Throws:
        Exception
      • hasPackageAccess

        public static boolean hasPackageAccess()
        Returns true if the ClassDefiner has access to package-private members.
      • isAnonymousHost

        public static boolean isAnonymousHost​(Class<?> hostClass)
        Does the given class host new types anonymously, meaning they are not visible by name?