You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (Commented) (JIRA)" <de...@uima.apache.org> on 2011/12/08 00:24:40 UTC

[jira] [Commented] (UIMA-2102) Make ResourceManager_impl.ResourceRegistration protected

    [ 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