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

David Leangen commented on FELIX-5614:
--------------------------------------

Just a thought...

On a related not, what would you think about providing the ability to inject 
the "isDTOType" rule into the Converter implementation?

Of course, the default would be compliant to the DTO spec, but it would also 
allow people (ahem, like me) to use non-compliant rules. For instance, I find 
it very practical to have a non-default constructor, but this is not DTO 
compliant.

  (Related issue: https://osgi.org/bugzilla/show_bug.cgi?id=212)

Having the ability to inject the rule will allow people like me to use their 
own custom version of the "isDTO" test, so it wouldn't be necessary to 
continuously have to call "source/targetAsDTO" every single time.

> Make isDTOType(Class<?> cls) publicly available
> -----------------------------------------------
>
>                 Key: FELIX-5614
>                 URL: https://issues.apache.org/jira/browse/FELIX-5614
>             Project: Felix
>          Issue Type: Improvement
>          Components: Converter
>            Reporter: David Leangen
>            Assignee: David Bosschaert
>
> In ConvertingImpl, which a (bundle private) implementation class, there is a 
> (class private) method: isDTOType(Class<?> cls)
> Since this is a rule based on the definition of a DTO in the spec, it would 
> be nice to make this test somehow available publicly for general use 
> (including by other bundles).
> It tedious for each user of the API to write their own test if an 
> authoritative test is already available.
> For my particular use case, the Schematizer needs to test a class to 
> determine whether or not it is a DTO in order to know how to handle it. 
> Having the test available (without having to copy over the code from the 
> Converter) would be quite useful..



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to