/** * @see org.seasar.framework.container.S2Container#injectDependency(java.lang.Object, * java.lang.Class) */ public void injectDependency(Object outerComponent, Class componentClass) { assertParameterIsNotNull(outerComponent, "outerComponent"); assertParameterIsNotNull(componentClass, "componentClass"); ComponentDef cd = S2ContainerBehavior.acquireFromInjectDependency(this, componentClass); if (cd != null) { cd.injectDependency(outerComponent); } }
/** * @see org.seasar.framework.container.S2Container#injectDependency(java.lang.Object, * java.lang.String) */ public void injectDependency(Object outerComponent, String componentName) { assertParameterIsNotNull(outerComponent, "outerComponent"); assertParameterIsNotEmpty(componentName, "componentName"); ComponentDef cd = S2ContainerBehavior.acquireFromInjectDependency(this, componentName); if (cd != null) { cd.injectDependency(outerComponent); } }
/** @see org.seasar.framework.container.S2Container#getComponent(java.lang.Object) */ public Object getComponent(Object componentKey) { assertParameterIsNotNull(componentKey, "componentKey"); ComponentDef cd = S2ContainerBehavior.acquireFromGetComponent(this, componentKey); if (cd == null) { return null; } return cd.getComponent(); }
/** @see org.seasar.framework.container.S2Container#hasComponentDef(java.lang.Object) */ public boolean hasComponentDef(Object componentKey) { assertParameterIsNotNull(componentKey, "componentKey"); return S2ContainerBehavior.acquireFromHasComponentDef(this, componentKey) != null; }
/** @see org.seasar.framework.container.S2Container#getComponentDef(java.lang.Object) */ public ComponentDef getComponentDef(Object key) throws ComponentNotFoundRuntimeException { assertParameterIsNotNull(key, "key"); return S2ContainerBehavior.acquireFromGetComponentDef(this, key); }