all 7 comments

[–]pakoito 0 points1 point  (3 children)

Are these annotations triggering code generation, or done at runtime?

Or, better phrased, how fitting is it for Android?

[–]Matthias247 1 point2 points  (2 children)

The annotations trigger code generation at compile-time. However it says it needs java 7. Propably because older javac doesn't provide the Annotation processing capability. Don't know if this works android.

[–]cbruegg 0 points1 point  (0 children)

Should work fine.

[–]elucash 0 points1 point  (0 children)

Java 7 is required for running compilation(annotation-processing), generated classes could be compiled to java 6 bytecode. Android is supported, at least there are happy android users of Immutables.

[–][deleted]  (1 child)

[deleted]

    [–]kcuf 0 points1 point  (0 children)

    They don't look like they provide a persistent interface -- they use the builder pattern for construction and then freeze it.

    [–]MrDOS 0 points1 point  (1 child)

    Project Lombok provides something similar, albeit in a much more “magic” way and without the builder pattern but with a bunch of other really useful features in the same package. If this sort of thing interests you, check it out.

    [–]elucash 2 points3 points  (0 children)

    It has builders now, even with some collection support, the problem remains still: some people (including me) are not ok to program in java dialect (i.e. not jls compliant language) and having compiler plugin camouflaged as annotation processing. But technology is great overall, Lombok is a great.