uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Eckart de Castilho (Commented) (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-2102) Make ResourceManager_impl.ResourceRegistration protected
Date Wed, 07 Dec 2011 23:24:40 GMT

    [ https://issues.apache.org/jira/browse/UIMA-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164831#comment-13164831
] 

Richard Eckart de Castilho commented on UIMA-2102:
--------------------------------------------------

Happy that the class is not protected in 2.4.0, I was going to change my code in uimaFIT to
use this class. However, the constructor is still package private, so that I cannot created
instanced of the class in my subclass of ResourceManager_Impl.

For the next minor release, please also make the constructor protected. While I don't need
it, following my initial argumentation, I think the fields should also be protected since
there are not public/protected getters.

I currently have to use this somewhat ugly code to create an instance of the class:

{code}
// Register resource
// ResourceRegistration unfortunately is package private
Object reg = newInstance(
  "org.apache.uima.resource.impl.ResourceManager_impl$ResourceRegistration",
  Object.class, context.getBean(name),
  ExternalResourceDescription.class, null,
  String.class, aQualifiedContextName);
((Map) mInternalResourceRegistrationMap).put(name, reg);
{code}
                
> Make ResourceManager_impl.ResourceRegistration protected
> --------------------------------------------------------
>
>                 Key: UIMA-2102
>                 URL: https://issues.apache.org/jira/browse/UIMA-2102
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.3.1
>            Reporter: Richard Eckart de Castilho
>            Priority: Minor
>
> I wanted to extend the ResourceManager_impl in an effort to explore the injection of
POJOs into UIMA components. This effort was complicated a bit because the class ResourceManager_impl.ResourceRegistration
is package private. For people who want to implement their own version of a ResourceManager,
I suppose it would be helpful if that class was protected instead, so subclasses can properly
work with the mInternalResourceRegistrationMap field, which is also protected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message