com.opensymphony.xwork2.inject
Interface Context


public interface Context

Context of the current injection.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 Container getContainer()
          Gets the Container.
 Member getMember()
          Gets the field, method or constructor which is being injected.
 String getName()
          Gets the name of the injection specified by Inject.value().
 Scope.Strategy getScopeStrategy()
          Gets the current scope strategy.
 Class<?> getType()
          Gets the type of the field or parameter which is being injected.
 

Method Detail

getContainer

Container getContainer()
Gets the Container.


getScopeStrategy

Scope.Strategy getScopeStrategy()
Gets the current scope strategy. See Container.setScopeStrategy(Scope.Strategy).

Throws:
IllegalStateException - if no strategy has been set

getMember

Member getMember()
Gets 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()
Gets the type of the field or parameter which is being injected.


getName

String getName()
Gets the name of the injection specified by Inject.value().



Copyright © 2009 OpenSymphony. All Rights Reserved.