You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by yomi <ab...@vistaprint.com> on 2015/12/18 17:46:47 UTC

Re: Generate java code with getters returning primitives instead of wrapper classes

I'd like to echo hannes question:
is there a way to generate the avro classes with getters, setters and
constructors that support primitive types?

Regards,
Yomi





--
View this message in context: http://apache-avro.679487.n3.nabble.com/Generate-java-code-with-getters-returning-primitives-instead-of-wrapper-classes-tp4032580p4033705.html
Sent from the Avro - Users mailing list archive at Nabble.com.

Re: Generate java code with getters returning primitives instead of wrapper classes

Posted by Damiaan van der Kruk <da...@gmail.com>.
I've made an Eclipse editor plugin for avro idl called Avroclipse (
https://github.com/dvdkruk/avroclipse). It can be downloaded from the
eclipse marketplace or from github. This plugin allows you to attach
special (code) generators to it, to generate the things you want. I already
made a generator that creates java classes with primitive types that are
avro reflect compatibel.
For this you need to use the avroclipse.generator.java package/feature.

Hopefully this is the functionality you want. Give it a try, I would say
;-)

Regards,
Damiaan

Op za 23 jan. 2016 om 14:30 schreef Matheus Santana <
edmatheus.santana@gmail.com>:

> One possibility is overriding default templates which are used for code
> generation <http://stackoverflow.com/a/21035683/1287376>.
>
> On Fri, Dec 18, 2015 at 1:46 PM, yomi <ab...@vistaprint.com> wrote:
>
>> I'd like to echo hannes question:
>> is there a way to generate the avro classes with getters, setters and
>> constructors that support primitive types?
>>
>> Regards,
>> Yomi
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-avro.679487.n3.nabble.com/Generate-java-code-with-getters-returning-primitives-instead-of-wrapper-classes-tp4032580p4033705.html
>> Sent from the Avro - Users mailing list archive at Nabble.com.
>>
>
>

Re: Generate java code with getters returning primitives instead of wrapper classes

Posted by Matheus Santana <ed...@gmail.com>.
One possibility is overriding default templates which are used for code
generation <http://stackoverflow.com/a/21035683/1287376>.

On Fri, Dec 18, 2015 at 1:46 PM, yomi <ab...@vistaprint.com> wrote:

> I'd like to echo hannes question:
> is there a way to generate the avro classes with getters, setters and
> constructors that support primitive types?
>
> Regards,
> Yomi
>
>
>
>
>
> --
> View this message in context:
> http://apache-avro.679487.n3.nabble.com/Generate-java-code-with-getters-returning-primitives-instead-of-wrapper-classes-tp4032580p4033705.html
> Sent from the Avro - Users mailing list archive at Nabble.com.
>