org.apache.commons.proxy.provider
Class ConstantProvider
java.lang.Object
org.apache.commons.proxy.provider.ConstantProvider
- All Implemented Interfaces:
- ObjectProvider
- Direct Known Subclasses:
- NullProvider
public class ConstantProvider
- extends Object
- implements ObjectProvider
Always returns the same object.
- Since:
- 1.0
- Author:
- James Carman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantProvider
public ConstantProvider(Object constant)
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
Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.