uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: generics: ResourceFactory.produceResource
Date Thu, 20 Aug 2009 12:11:12 GMT
Adam Lally wrote:
> On Wed, Aug 19, 2009 at 1:54 PM, Jörn Kottmann<kottmann@gmail.com> wrote:
>   
>> The current declaration with out generics:
>>
>>  public Resource produceResource(Class aResourceClass, ResourceSpecifier
>> aSpecifier,
>>         Map<String, Object> aAdditionalParams) throws
>> ResourceInitializationException;
>>
>> Can it be assumed that aResourceClass is always a class which extends
>> Resource,
>> if so it could be declared as Class<? extends Resource>.
>>
>>     
>
> Yes, I think that is right.
>   
In CPEFactory a org.apache.uima.collection.base_cpm.BaseCollectionReader 
is used
as a resource class at line 345 to call UIMAFramework.produceResource.
BaseCollectionReader does not extends the Resource interface.

I wonder if that is correct usage of the produceResource method.

Jörn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message