Annotation Type Precompile


@Retention(SOURCE) @Repeatable(Precompiles.class) @Deprecated public @interface Precompile
Deprecated.
Use -Amanifold.resource.<file-ext>=[type-name-regex] javac command line arguments.
Use @Precompile to instruct Manifold to precompile classes from a specified type manifold. This is useful for cases where a type manifold produces a static API for others to use. Note you maybe provide more than one instance of @Precompile to precompile types from more than one type manifold:
@Precompile(fileExtension = "json")
@Precompile(fileExtension = "yml") 
This instructs the Java compiler to precompile all JSON and YAML in the enclosing module.

The default behavior:

@Precompile() 
compiles all types from all type manifolds used in the module.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Deprecated.
    A file extension name e.g., "json", handled by the Type Manifold class defining the domain of types to compile.
    Deprecated.
    The Type Manifold class defining the domain of types to compile from.
    Deprecated.
    A regular expression defining the range of types that should be compiled from typeManifold() or fileExtension() via ITypeManifold#getAllTypeNames().
  • Element Details

    • typeManifold

      Class<?> typeManifold
      Deprecated.
      The Type Manifold class defining the domain of types to compile from.

      Use fileExtension() as a convenient alternative way to specify the type manifold via a file extension it handles.

      Default:
      java.lang.Object.class
    • fileExtension

      String fileExtension
      Deprecated.
      A file extension name e.g., "json", handled by the Type Manifold class defining the domain of types to compile. This value is an alternative to typeManifold() as a simple way to indirectly specify the ITypeManifold. If both arguments are present, typeManifold() has precedence.

      The default wildcard value "*" precompiles types from all type manifolds used in the module

      Default:
      "*"
    • typeNames

      String typeNames
      Deprecated.
      A regular expression defining the range of types that should be compiled from typeManifold() or fileExtension() via ITypeManifold#getAllTypeNames(). The default value ".*" compiles all types originating from the specified type manifold.
      Default:
      ".*"