org.apache.hivemind.service.impl
Class ClassObjectProvider

java.lang.Object
  extended by org.apache.hivemind.service.impl.ClassObjectProvider
All Implemented Interfaces:
ObjectProvider

public class ClassObjectProvider
extends java.lang.Object
implements ObjectProvider

Implementation of ObjectProvider that interprets the locator as a class name and converts it to a Class object. The namemay be partial; it is interpreted using the contributing module's package name. Mapped to the "class:" prefix.

Since:
1.1
Author:
Howard M. Lewis Ship

Constructor Summary
ClassObjectProvider()
           
 
Method Summary
 java.lang.Object provideObject(Module contributingModule, java.lang.Class propertyType, java.lang.String locator, Location location)
          Invoked by the translator to provide the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassObjectProvider

public ClassObjectProvider()
Method Detail

provideObject

public java.lang.Object provideObject(Module contributingModule,
                                      java.lang.Class propertyType,
                                      java.lang.String locator,
                                      Location location)
Description copied from interface: ObjectProvider
Invoked by the translator to provide the value.

Specified by:
provideObject in interface ObjectProvider
Parameters:
contributingModule - the module which contributed to the locator
propertyType - the expected type of property
locator - a string that should be meaningful to this provider. It is the suffix of the original input value provided to the translator, after the selector prefix (used to choose a provider) was stripped.
location - the location of the input value (from which the locator was extracted). Used for error reporting, or to set the location of created objects.