接口 TestRuntimeHintsRegistrar

所有已知实现类:
StandardTestRuntimeHints

public interface TestRuntimeHintsRegistrar
Contract for registering RuntimeHints for integration tests run with the Infra TestContext Framework based on the ClassLoader of the deployment unit. Implementations should, if possible, use the specified ClassLoader to determine if hints have to be contributed.

Implementations of this interface must be registered statically in META-INF/config/aot.factories by using the fully qualified name of this interface as the key. A standard no-arg constructor is required for implementations.

This API serves as a companion to the core RuntimeHintsRegistrar API. If you need to register global hints for testing support that are not specific to particular test classes, favor implementing RuntimeHintsRegistrar over this API.

As an alternative to implementing and registering a TestRuntimeHintsRegistrar, you may choose to annotate a test class with @Reflective, @RegisterReflectionForBinding, or @ImportRuntimeHints.

从以下版本开始:
4.0
作者:
Sam Brannen, Harry Yang
另请参阅:
  • RuntimeHintsRegistrar
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    registerHints(cn.taketoday.aot.hint.RuntimeHints runtimeHints, Class<?> testClass, ClassLoader classLoader)
    Contribute hints to the given RuntimeHints instance.
  • 方法详细资料

    • registerHints

      void registerHints(cn.taketoday.aot.hint.RuntimeHints runtimeHints, Class<?> testClass, ClassLoader classLoader)
      Contribute hints to the given RuntimeHints instance.
      参数:
      runtimeHints - the RuntimeHints to use
      testClass - the test class to process
      classLoader - the classloader to use