[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-20 Thread David Leangen (JIRA)

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

David Leangen commented on FELIX-5475:
--

Beautiful, thanks! I haven't yet looked at the changes, but my plan is to 
update this issue, then begin work on the impl.

I think I'll just have to squash all the previous changes into one largish 
commit. My expectation is that is should be relatively easy to make the change 
from sourceAs(DTO.class) to sourceAsDTO(), but we'll see!

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-20 Thread David Bosschaert (JIRA)

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

David Bosschaert commented on FELIX-5475:
-

Hi [~dleangen]

Yeah, I went ahead and added the methods to the OSGi API immediately after our 
discussion so when BJ looked it was already there.
I've now updated the codebase in Felix as well: 
https://svn.apache.org/viewvc?view=revision&revision=1779604

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-19 Thread David Leangen (JIRA)

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

David Leangen commented on FELIX-5475:
--

[~bosschaert], I filed the change request on the OSGi bugzilla as you 
suggested. BJ immediately replied, saying that this had already been done.

Would you kindly make the change to the API? I will work on the impl following 
that update, and will also consequently update this issue and the PR.

Thanks!

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-16 Thread David Leangen (JIRA)

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

David Leangen commented on FELIX-5475:
--

I am already getting a bit confused with all the different branches. Will await 
review and (hopefully) acceptance of the currently outstanding PRs before 
resuming work on this one.

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-16 Thread David Leangen (JIRA)

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

David Leangen commented on FELIX-5475:
--

Ok, I'll do that. I think it would be easier, though to first get the various 
smaller changes out of the way. I'll try to make separate issues and PRs for 
each so it is easier for you to review. Then I'll get back to this "big" issue.

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-16 Thread David Bosschaert (JIRA)

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

David Bosschaert commented on FELIX-5475:
-

Let's try it with the changed API... If you'd like to give it a go that would 
be great!

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-16 Thread David Leangen (JIRA)

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

David Leangen commented on FELIX-5475:
--

If you are referring to the API, then yes, for sure! I think it would be 
easier. I thought that it was already decided to take this out, though.

If it's ok to change the API, I will give it a go. Please let me know.

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FELIX-5475) Allow the use of DTO.class to signal that an Object should be treated as a DTO.

2017-01-16 Thread David Bosschaert (JIRA)

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

David Bosschaert commented on FELIX-5475:
-

I'm wondering whether it may be cleaner to add a method 'sourceAsDTO()' since 
the class does not necessarily implement the DTO.class and the DTO.class does 
not really provide any fields itself, so it would be an unusual interpretation 
as the source object... I think if we add a separate method called 
'sourceAsDTO()' it might be clearer what's going on...

> Allow the use of DTO.class to signal that an Object should be treated as a 
> DTO.
> ---
>
> Key: FELIX-5475
> URL: https://issues.apache.org/jira/browse/FELIX-5475
> Project: Felix
>  Issue Type: Improvement
>  Components: Converter
>Reporter: David Leangen
>
> Sometimes it is useful to treat a class as if it were a DTO, i.e. by ignoring 
> methods, static fields etc.
> This can be done using the sourceAs(Class) method with the DTO.class as the 
> parameter. This is a non-ambiguous way to signal to the Converter to treat 
> any Object as if it were a DTO (at the risk of the caller).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)