net.israfil.micro.container.adapters
Class IndependentAutoWiringAdapter

java.lang.Object
  extended by net.israfil.micro.container.adapters.AbstractAutoWiringAdapter
      extended by net.israfil.micro.container.adapters.IndependentAutoWiringAdapter
All Implemented Interfaces:
AutoWiringAdapter, ComponentFactory

public class IndependentAutoWiringAdapter
extends AbstractAutoWiringAdapter

A convenience implementation of AutoWiringAdapter which can be used for those clases that have no dependencies and have a default constructor.

Author:
Christian Edward Gruber

Constructor Summary
IndependentAutoWiringAdapter(java.lang.Class type)
           
 
Method Summary
 java.lang.Object create(java.util.Hashtable parameters)
          This method implements AutoWiringAdapter.create() but throws a runtime exception if any parameters are passed, and uses the default (no parameter) constructor via Class.newInstance(); to generate the new instance.
 
Methods inherited from class net.israfil.micro.container.adapters.AbstractAutoWiringAdapter
dependencies, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndependentAutoWiringAdapter

public IndependentAutoWiringAdapter(java.lang.Class type)
Method Detail

create

public java.lang.Object create(java.util.Hashtable parameters)
                        throws java.lang.IllegalAccessException,
                               java.lang.InstantiationException
This method implements AutoWiringAdapter.create() but throws a runtime exception if any parameters are passed, and uses the default (no parameter) constructor via Class.newInstance(); to generate the new instance.

Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException


Copyright © 2008. All Rights Reserved.