Package org.apache.struts2.inject

# Interface Context

public interface Context
Context of the current injection.

Author:
  crazybob@google.com (Bob Lee)

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Container`
  `getContainer()`
  `Member`
  `getMember()`
  `String`
  `getName()`
  `Scope.Strategy`
  `getScopeStrategy()`
  `Class<?>`
  `getType()`

- ## Method Details

  - ### getContainer

    Container getContainer()
    Returns:
      the `Container`.

  - ### getScopeStrategy

    Scope.Strategy getScopeStrategy()
    Returns:
      the current scope strategy. See `Container.setScopeStrategy(Scope.Strategy)`.
    Throws:
      `IllegalStateException` - if no strategy has been set

  - ### getMember

    Member getMember()
    Returns:
      the field, method or constructor which is being injected. Returns `null` if the object currently being constructed is pre-loaded as a singleton or requested from `Container.getInstance(Class)`.

  - ### getType

    Class<?> getType()
    Returns:
      the type of the field or parameter which is being injected.

  - ### getName

    String getName()
    Returns:
      the name of the injection specified by `Inject.value()`.