Class LoadedTypeInitializer.Compound

    • Constructor Detail

      • Compound

        public Compound​(LoadedTypeInitializer... loadedTypeInitializer)
        Creates a new compound loaded type initializer.
        Parameters:
        loadedTypeInitializer - A number of loaded type initializers in their invocation order.
      • Compound

        public Compound​(java.util.List<? extends LoadedTypeInitializer> loadedTypeInitializers)
        Creates a new compound loaded type initializer.
        Parameters:
        loadedTypeInitializers - A number of loaded type initializers in their invocation order.
    • Method Detail

      • onLoad

        public void onLoad​(java.lang.Class<?> type)
        Description copied from interface: LoadedTypeInitializer
        Callback that is invoked on the creation of an instrumented type. If the loaded type initializer is alive, this method should be implemented empty instead of throwing an exception.
        Specified by:
        onLoad in interface LoadedTypeInitializer
        Parameters:
        type - The manifestation of the instrumented type.
      • isAlive

        public boolean isAlive()
        Description copied from interface: LoadedTypeInitializer
        Indicates if this initializer is alive and needs to be invoked. This is only meant as a mark. A loaded type initializer that is not alive might still be called and must therefore not throw an exception but rather provide an empty implementation.
        Specified by:
        isAlive in interface LoadedTypeInitializer
        Returns:
        true if this initializer is alive.