jfun.yan
Interface PropertiesInjector

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DefaultPropertiesInjector, FilteredPropertiesInjector

public interface PropertiesInjector
extends java.io.Serializable

Represents the logic that pulls property values from a Dependency object and inject them into the appropriate properties.

A typical implementation may use java.beans package to do introspection. Yet, it is also possible to use any other naming convention, such as "injectAge" for property "age", or use the "age" field directly.

Author:
Ben Yu Dec 16, 2005 1:08:50 PM

Method Summary
 void injectProperties(java.lang.Object obj, Dependency dep)
          Pull property values and inject to the object.
 void verifyProperties(java.lang.Class type, Dependency dep)
          Verify that all required properties are resolveable.
 

Method Detail

injectProperties

void injectProperties(java.lang.Object obj,
                      Dependency dep)
Pull property values and inject to the object.

Parameters:
obj - the object to inject properties to.
dep - the dependency to pull property values form.

verifyProperties

void verifyProperties(java.lang.Class type,
                      Dependency dep)
Verify that all required properties are resolveable.

Parameters:
type - the type that has the properties.
dep - the dependency to resolve properties.