Package org.apache.struts2.inject

# Annotation Interface Inject

@Target({METHOD,CONSTRUCTOR,FIELD,PARAMETER}) @Retention(RUNTIME) public @interface Inject

Annotates members and parameters which should have their value[s] injected.

Author:
  crazybob@google.com (Bob Lee)

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `boolean`
  `required`
  `String`
  `value`

- ## Element Details

  - ### value

    String value
    Returns:
      Dependency name. Defaults to `Container.DEFAULT_NAME`.
    Default:
      "default"

  - ### required

    boolean required
    Returns:
      Whether or not injection is required. Applicable only to methods and fields (not constructors or parameters).
    Default:
      true