类 TestContextGenerationContext

java.lang.Object
cn.taketoday.aot.generate.DefaultGenerationContext
cn.taketoday.test.context.aot.TestContextGenerationContext
所有已实现的接口:
cn.taketoday.aot.generate.GenerationContext

class TestContextGenerationContext extends cn.taketoday.aot.generate.DefaultGenerationContext
Extension of DefaultGenerationContext with a custom implementation of withName(String) that is specific to the Infra TestContext Framework.
从以下版本开始:
4.0
作者:
Sam Brannen, Harry Yang
  • 字段详细资料

    • featureName

      @Nullable private final String featureName
  • 构造器详细资料

    • TestContextGenerationContext

      TestContextGenerationContext(cn.taketoday.aot.generate.ClassNameGenerator classNameGenerator, cn.taketoday.aot.generate.GeneratedFiles generatedFiles, cn.taketoday.aot.hint.RuntimeHints runtimeHints)
      Create a new TestContextGenerationContext instance backed by the specified ClassNameGenerator, GeneratedFiles, and RuntimeHints.
      参数:
      classNameGenerator - the naming convention to use for generated class names
      generatedFiles - the generated files
      runtimeHints - the runtime hints
    • TestContextGenerationContext

      private TestContextGenerationContext(TestContextGenerationContext existing, String featureName)
      Create a new TestContextGenerationContext instance based on the supplied existing context and feature name.
      参数:
      existing - the existing context upon which to base the new one
      featureName - the feature name to use
  • 方法详细资料

    • withName

      public TestContextGenerationContext withName(String featureName)
      Create a new TestContextGenerationContext instance using the specified feature name to qualify generated assets for a dedicated round of code generation.

      If this TestContextGenerationContext has a configured feature name, the existing feature name will prepended to the supplied feature name in order to avoid naming collisions.

      指定者:
      withName 在接口中 cn.taketoday.aot.generate.GenerationContext
      覆盖:
      withName 在类中 cn.taketoday.aot.generate.DefaultGenerationContext
      参数:
      featureName - the feature name to use
      返回:
      a specialized TestContextGenerationContext for the specified feature name