@interface Foo : NSObject { Bar *_bar; } @property (retain) Bar *bar; @end @implementation Foo @synthesize bar = _bar; - (void)dealloc { [_bar release]; [super dealloc]; } @end
149 chars
public final class Foo { private final Bar bar; public Bar getBar() { return bar; } public Foo(Bar bar) { this.bar = bar; } }
101 chars
@AutoValue
public abstract class Foo {
public abstract Bar getBar();
public static Foo create(Bar bar) {
return new AutoValue_Foo(bar);
}
}
119 chars
@AutoValue public abstract class Foo { public abstract Bar getBar(); public static Foo create(Bar bar) { return new AutoValue_Foo(bar); } }
119 chars
public final class Foo { private final Bar bar; public Bar getBar() { return bar; } public Foo(Bar bar) { this.bar = bar; } }
101 chars
public class Foo { Bar bar; }
23 chars
@Value
public class Foo {
Bar bar;
}
29 chars
@Value public class Foo { Bar bar; }
29 chars
class Foo { Bar bar }
16 chars
@Immutable
class Foo {
Bar bar
}
26 chars
Annotation Processing API
Annotation Processing API
Lombok & Hrisey
Annotation Processing API
Lombok & Hrisey
Groovy
Annotation Processing API
Lombok & Hrisey
Groovy
Talk is cheap
Annotation Processing API
Lombok & Hrisey
Groovy
Talk is cheap
Wrap up