Annotation Interface Resolution


@Experimental @Documented @Retention(RUNTIME) @Target(FIELD) public @interface Resolution
Indicates that a given field will be injected with the result of a dependency collection or resolution request. Whether a collection or resolution request is performed is controlled by the pathScope() field, the injected field type and the requestType().

If the requestType is not set explicitly, it will be inferred from the pathScope and the injected field type. If the type is Node and pathScope == "", then the dependencies will be collected. If the type is Node or List<Node>, and pathScope != "", the dependencies will be flattened. Else the dependencies will be resolved and pathScope must be non empty, and the field type can be Node, List<Node>, DependencyResolverResult, List<Path>, Map<PathType, List<Path>>, or Map<Dependency, Path>.

Since:
4.0.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The id of a PathScope enum value.
    The request type, in case the default one is not correct.
  • Element Details

    • pathScope

      String pathScope
      The id of a PathScope enum value. If specified, a dependency resolution request will be issued, else a dependency collection request will be done.
      Returns:
      the id of the path scope
      Default:
      ""
    • requestType

      String requestType
      The request type, in case the default one is not correct. Valid values are collect, flatten, or resolve.
      Returns:
      the request type
      Default:
      ""