Hi,
I agree that it would definitely make sense to change factory to protected.
Grepping through the code however reveals that the pattern my changeset
follows is repeated in many other classes. That is, there are multiple
extending classes that define a field called factory and store the factory
given to the constructor to this field.
So I would propose that this indeed would be worked out, but it falls out
of scope of my changeset. It would make sense to do a quick separate pull
request for this modification now, or after my work is merged in.
Sampo
On Thu, Nov 13, 2014 at 4:11 PM, Jody Garnett <[email protected]>
wrote:
> I would prefer to change the visibility of AbstractComplexEMFBinding.factory
> to protected.
>
> I guess we will need to check if this is possible, it could be a "friend"
> class such as a test case is wanting access to this field also.
>
> Jody Garnett
>
> On Mon, Nov 10, 2014 at 11:36 PM, Sampo Savolainen <
> [email protected]> wrote:
>
>> Hi,
>>
>> In my pull request, I have a class, FeatureTypeBinding, that extends
>> AbstractComplexEMFBinding. I need to access the EFactory instance within
>> the super class from FeatureTypeBinding. The AbstractComplexEMFBinding
>> class defines the factory field with package visibility, which hides this
>> field from this extending class.
>>
>> To work around this, I've stored the EFactory object in a field in the
>> extending class as well and I use this field instead. This works, but Isn't
>> very elegant.
>>
>> Should I make the field in AbstractComplexEMFBinding protected or perhaps
>> add a protected / public getter for it? Or is storing the EFactory in the
>> implementing class the preferred strategy?
>>
>>
>> Here's the commit and comment for reference:
>>
>> https://github.com/sampov2/geotools/commit/f8a7d7cfe9c3c75e5619d9960a6747a220af1e43#commitcomment-8379157
>>
>>
>> Thanks,
>> Sampo
>>
>> --
>> Sampo Savolainen
>> R&D Director, Spatineo Oy
>> [email protected]
>> +358-407555649
>> Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
>> www.spatineo.com, twitter.com/#!/spatineo
>> www.linkedin.com/company/spatineo-inc
>>
>> This message may contain privileged and/or confidential information. If
>> you
>> have received this e-mail in error or are not the intended recipient, you
>> may not use, copy, disseminate, or distribute it; do not open any
>> attachments, delete it immediately from your system and notify the sender
>> promptly by e-mail that you have done so.
>>
>>
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>> _______________________________________________
>> GeoTools-Devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>
>>
>
--
Sampo Savolainen
R&D Director, Spatineo Oy
[email protected]
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel