jfun.yan.xml.nuts.optional
Class InjectorNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.ComponentNut
          extended by jfun.yan.xml.nuts.optional.InjectorNut
All Implemented Interfaces:
java.io.Serializable

public class InjectorNut
extends ComponentNut

This Nut class instantiates an injector object that implements a given interface.

The injection logic is defined by the "binder" attribute that references a Binder object.

Author:
Ben Yu Nov 10, 2005 12:17:26 AM
See Also:
Serialized Form

Field Summary
static InjectorHelper helper
           
 
Constructor Summary
InjectorNut()
           
 
Method Summary
 void add(Binder binder)
           
 Component eval()
           
 Binder getInjection()
           
 java.lang.Class getType()
           
 void setInjection(Binder injection)
           
 void setType(java.lang.Class itf)
           
 
Methods inherited from class jfun.yan.xml.nut.Nut
cast, checkDuplicate, checkMandatory, checkMandatory, convert, getComponentClassLoader, getId, getNutClassLoader, getNutEnvironment, getParameterWiring, getPropertyWiring, getSequenceNumber, getTagLocation, getTagName, initGloballyDefined, initNutEnvironment, initSequenceNumber, initTagLocation, initTagName, isGloballyDefined, raise, raise, register, registerEagerInstantiation, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

helper

public static final InjectorHelper helper
Constructor Detail

InjectorNut

public InjectorNut()
Method Detail

getInjection

public Binder getInjection()

setInjection

public void setInjection(Binder injection)

add

public void add(Binder binder)

getType

public java.lang.Class getType()

setType

public void setType(java.lang.Class itf)

eval

public Component eval()
Specified by:
eval in class ComponentNut