org.apache.commons.proxy.provider
Class BeanProvider

java.lang.Object
  extended by org.apache.commons.proxy.provider.BeanProvider
All Implemented Interfaces:
ObjectProvider

public class BeanProvider
extends Object
implements ObjectProvider

Uses Class.newInstance() to instantiate an object.

Since:
1.0
Author:
James Carman

Constructor Summary
BeanProvider()
           
BeanProvider(Class beanClass)
          Constructs a provider which instantiates objects of the specified bean class.
 
Method Summary
 Object getObject()
          Returns an object.
 void setBeanClass(Class beanClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanProvider

public BeanProvider()

BeanProvider

public BeanProvider(Class beanClass)
Constructs a provider which instantiates objects of the specified bean class.

Parameters:
beanClass - the bean class
Method Detail

getObject

public Object getObject()
Description copied from interface: ObjectProvider
Returns an object. Implementing classes should throw a ObjectProviderException if any problems arise while constructing/finding the object.

Specified by:
getObject in interface ObjectProvider
Returns:
the object on which the method should be called

setBeanClass

public void setBeanClass(Class beanClass)


Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.