You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Simon Steiner <si...@gmail.com> on 2015/04/15 13:47:45 UTC

api question

Hi,

 

Why do you  have classes where getCOSObject is public but getCOSDictionary
is not public?

 

Thanks


Re: api question

Posted by Tilman Hausherr <TH...@t-online.de>.
Done.

Tilman

Am 16.04.2015 um 10:25 schrieb Simon Steiner:
> Hi,
>
> PDStructureNode
> PDObjectReference
> PDMarkedContentReference
>
> Thanks
>
> -----Original Message-----
> From: Tilman Hausherr [mailto:THausherr@t-online.de]
> Sent: 15 April 2015 20:33
> To: dev@pdfbox.apache.org
> Subject: Re: api question
>
> Am 15.04.2015 um 13:47 schrieb Simon Steiner:
>> Hi,
>>
>>    
>>
>> Why do you  have classes where getCOSObject is public but
>> getCOSDictionary is not public?
> Can you mention a few classes where this happens?
>
> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional
> commands, e-mail: dev-help@pdfbox.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


RE: api question

Posted by Simon Steiner <si...@gmail.com>.
Hi,

PDStructureNode
PDObjectReference
PDMarkedContentReference

Thanks

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: 15 April 2015 20:33
To: dev@pdfbox.apache.org
Subject: Re: api question

Am 15.04.2015 um 13:47 schrieb Simon Steiner:
> Hi,
>
>   
>
> Why do you  have classes where getCOSObject is public but 
> getCOSDictionary is not public?

Can you mention a few classes where this happens?

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional
commands, e-mail: dev-help@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: api question

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 15.04.2015 um 13:47 schrieb Simon Steiner:
> Hi,
>
>   
>
> Why do you  have classes where getCOSObject is public but getCOSDictionary
> is not public?

Can you mention a few classes where this happens?

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: api question

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
> Am 23.04.2015 um 11:02 schrieb John Hewson <jo...@jahewson.com>:
> 
> 
> 
>> On 15 Apr 2015, at 04:47, Simon Steiner <si...@gmail.com> wrote:
>> 
>> Hi,
>> 
>> 
>> 
>> Why do you  have classes where getCOSObject is public but getCOSDictionary
>> is not public?
> 
> Legacy quirk. There's actually no need for any of the getCOSDictionary() methods, as getCOSObject() can be overloaded in any COSObjectable subclass to have COSDictionary as its return type. It seems that the author of getCOSDictionary(), etc. was not aware of this feature of the Java type system.

another side node - sometimes to get the COSDictionary the method is getCOSDictionary() and sometimes it's simply getDictionary() e.g. in PDAcroForm. Maybe worth considering to make that consistent - would got for getCOSxxx().

BR

> 
> -- John
> 
>> 
>> Thanks
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: api question

Posted by John Hewson <jo...@jahewson.com>.

> On 15 Apr 2015, at 04:47, Simon Steiner <si...@gmail.com> wrote:
> 
> Hi,
> 
> 
> 
> Why do you  have classes where getCOSObject is public but getCOSDictionary
> is not public?

Legacy quirk. There's actually no need for any of the getCOSDictionary() methods, as getCOSObject() can be overloaded in any COSObjectable subclass to have COSDictionary as its return type. It seems that the author of getCOSDictionary(), etc. was not aware of this feature of the Java type system.

-- John

> 
> Thanks
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org