Named constructors in GObject classes conventionally start with new_. This prefix is superfluous in the Java language bindings. For example, Button.newWithLabel() can more concisely be written as Button.withLabel(). Therefore, the Java-GI bindings has been changed to strip the new prefix from the name of the static factory methods for named constructors.
This is not a brand new idea; Gtk-rs also has this in a number of cases (including Button.with_label()).
Named constructors in GObject classes conventionally start with
new_
. This prefix is superfluous in the Java language bindings. For example,Button.newWithLabel()
can more concisely be written asButton.withLabel()
. Therefore, the Java-GI bindings has been changed to strip thenew
prefix from the name of the static factory methods for named constructors.This is not a brand new idea; Gtk-rs also has this in a number of cases (including
Button.with_label()
).