You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Liebig, Stefan " <St...@compeople.de> on 2005/01/20 11:26:41 UTC
ObjectProvider.provideObject(..) question/problem
It seems that the propertyType parameter of the ObjectProvider.provideObject(..):
/**
* Invoked by the translator to provide the value.
* @param contributingModule the module which contributed to the locator
* @param propertyType the expected type of property
* @param 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.
* @param 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.
*/
public Object provideObject(
Module contributingModule,
Class propertyType, <-------- here
String locator,
Location location);
always is Object.class. I thought that this parameter represents the expected type, which is
the one given within the constructor or setter signature. I just tested it with constructors injection!
The ServiceImplementationFactory.createCoreServiceImplementation(..) does provide the
expected type.
UseCase:
I am writing an object provider which itself asks another registry (not Hivemind) for a service. And
this requires its type because it creates a dynamic proxy which requires the expected type.
Can you please verify this!
Stefan
email: stefan.liebig@compeople.de
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
Re: ObjectProvider.provideObject(..) question/problem
Posted by Knut Wannheden <kn...@gmail.com>.
Stefan,
First of all, sorry about the long delay! I don't think the parameter
value always is Object.class, so this is possibly a bug in HiveMind.
Could you please provide more details about where you see this
behaviour? Maybe even A JUnit test :-)
--knut
On Thu, 20 Jan 2005 02:26:41 -0800, Liebig, Stefan
<St...@compeople.de> wrote:
> It seems that the propertyType parameter of the ObjectProvider.provideObject(..):
>
> /**
> * Invoked by the translator to provide the value.
> * @param contributingModule the module which contributed to the locator
> * @param propertyType the expected type of property
> * @param 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.
> * @param 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.
> */
> public Object provideObject(
> Module contributingModule,
> Class propertyType, <-------- here
> String locator,
> Location location);
>
> always is Object.class. I thought that this parameter represents the expected type, which is
> the one given within the constructor or setter signature. I just tested it with constructors injection!
> The ServiceImplementationFactory.createCoreServiceImplementation(..) does provide the
> expected type.
>
> UseCase:
> I am writing an object provider which itself asks another registry (not Hivemind) for a service. And
> this requires its type because it creates a dynamic proxy which requires the expected type.
>
> Can you please verify this!
>
> Stefan
> email: stefan.liebig@compeople.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org