org.springframework.jee.inject
Class Injection<E extends InjectionInfo>

java.lang.Object
  extended by org.springframework.jee.inject.Injection<E>
Direct Known Subclasses:
FieldInjection, MethodInjection

public abstract class Injection<E extends InjectionInfo>
extends java.lang.Object

Class modelling an injected member of a JEE component.

Author:
Rod Johnson, Costin Leau

Field Summary
protected  E info
           
protected  java.lang.reflect.Member member
           
 
Constructor Summary
Injection(java.lang.reflect.Member member, E resourceInfo)
           
 
Method Summary
abstract  void apply(java.lang.Object instance, java.lang.Object value)
          Applies the given value on the instance according to the injection information - implementation specific.
 boolean containsValue()
           
protected  java.lang.String getDefaultName()
          Return the default name to be used if the info does not contain one.
 E getInfo()
           
protected abstract  java.lang.Class getMemberType()
          Need to be implemented based on the member type.
 java.lang.String getName()
           
 java.lang.Class getType()
           
 java.lang.Object getValue()
           
 void setValue(java.lang.Object value)
          If this method is called, we are dealing with a literal value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

info

protected final E extends InjectionInfo info

member

protected final java.lang.reflect.Member member
Constructor Detail

Injection

public Injection(java.lang.reflect.Member member,
                 E resourceInfo)
Method Detail

getInfo

public E getInfo()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)
If this method is called, we are dealing with a literal value. A lookup will not be required: the value will be set.

Parameters:
value -

containsValue

public boolean containsValue()

getName

public java.lang.String getName()

getType

public java.lang.Class getType()

getDefaultName

protected java.lang.String getDefaultName()
Return the default name to be used if the info does not contain one.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMemberType

protected abstract java.lang.Class getMemberType()
Need to be implemented based on the member type.

Returns:

apply

public abstract void apply(java.lang.Object instance,
                           java.lang.Object value)
Applies the given value on the instance according to the injection information - implementation specific.

Parameters:
instance -
value -


Copyright 2006 Interface21. All Rights Reserved.