[jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
This will permit the following to work: ```java abstract class Resource { abstract String id(); abstract String type(); @Inject static Resource create(@Named(quot;idquot;) String id, @Named(quot;typequot;) type) { return new AutoValue_Resource(id, type); } } ``` Note that if we

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
cc @jdaggett @andreaturli --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60507916

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
@@ -71,23 +72,6 @@ } /** -* returns an {@link Invokable} object that reflects a constructor present in the {@link TypeToken} type. unused, so traded this code out so that I could put a little more in. --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #253](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/253/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60507947

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1342](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1342/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60507982

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
failures were due to the OCD checkstyle enforcing JLS order on test classes. bumped. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60520034

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1344](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1344/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60520946

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1859](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1859/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #256](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/256/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522107

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Jeremy Daggett
@adriancole You may have already sorted this out, but one issue I ran into is that the build doesn't move the generated `@AutoService` metadata into the `/META-INF/services` directory. IIRC, the Maven resources plugin needs to be configured appropriately to include the generated file. ---

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
@jdaggett PTAL on this part. Let's fix the services maven thing in another pull request! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522334

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
ps @demobox you're pretty good at maven fixing. mind having a look at the issue @jdaggett mentioned? should be possible to reproduce in azurecompute --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522402

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #257](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/257/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522811

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #258](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/258/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522846

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1345](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1345/) UNSTABLE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60522907

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1346](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1346/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60523025

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1347](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1347/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60523065

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #259](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/259/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60523237

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1348](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1348/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60523487

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1860](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1860/) UNSTABLE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
@@ -209,4 +210,67 @@ public void testDeserializeEnumWithParserAndBadValue() { EnumInsideWithParser.Test.UNRECOGNIZED); } + private abstract static class SpinalCasedType { + abstract String id(); + + abstract String contentType(); + + // Currently,

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Jeremy Daggett
@@ -209,4 +210,67 @@ public void testDeserializeEnumWithParserAndBadValue() { EnumInsideWithParser.Test.UNRECOGNIZED); } + private abstract static class SpinalCasedType { + abstract String id(); + + abstract String contentType(); + + // Currently,

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
OK. pretty sure all required stuff is in now. 1. allow auto types to be deserialized via `@SerializedNames` 2. bind fallback FieldNamingPolicy to address serialization in providers that have consistent case format. Doesn't address providers with mixed case format, as that makes things

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
I'll merge after tests pass and I have a provider working that uses this. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60525207

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Jeremy Daggett
@adriancole Can you please expand on your comment on the mixed case names in Keystone/Neutron? An example of what you are talking about would be extremely useful, thx! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60525319

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #261](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/261/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60525576

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1861](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1861/) UNSTABLE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1350](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1350/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60525805

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #262](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/262/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60525845

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1351](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1351/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60526136

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1862](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1862/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1863](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1863/) FAILURE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests-java-6 #263](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/263/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60527990

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #1352](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1352/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60528322

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread Adrian Cole
merged into master and 1.8.x --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/586#issuecomment-60528963

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1864](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1864/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds] Allow abstract value types to be constructed from json using static factory methods. (#586)

2014-10-26 Thread BuildHive
[jclouds » jclouds #1865](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1865/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: