Annotation Interface JkInject


@Retention(RUNTIME) @Target(FIELD) public @interface JkInject
Adds an entry to the jeka-src classpath where this annotation is declared. Typically, the annotated element is a KBean class from 'jeka/def' source directory. But when used on a public field of type KBean within a KBean class, the annotated field is injected with an initialised KBean instance of the imported project.

Example :


 public class FatJarBuild extends KBean {
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Dependee project relative path
  • Element Details

    • value

      String value
      Dependee project relative path
      Default:
      ""