Class ClassDefining

java.lang.Object
com.google.inject.internal.aop.ClassDefining

public final class ClassDefining extends Object
Entry-point for defining dynamically generated classes.
  • Field Details

  • Constructor Details

    • ClassDefining

      private ClassDefining()
  • Method Details

    • 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 current class definer allows access to package-private members.
    • canLoadProxyByName

      public static boolean canLoadProxyByName(Class<?> hostClass)
      Returns true if it's possible to load by name proxies defined from the given host.
    • canDowncastToProxy

      public static boolean canDowncastToProxy(Class<?> hostClass)
      Returns true if it's possible to downcast to proxies defined from the given host.
    • bindClassDefiner

      static ClassDefiner bindClassDefiner()
      Binds the preferred ClassDefiner instance.