Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate a builder class

Tags:

java

javafx-2

I have developed in a library a custom javafx.animation.Transition. I want to provide the corresponding builder (like the TranslateBuilder for the Translate transformation).

As you can see in the TranslateBuilder javadoc, the builder class is annotated by @Generated(value="Generated by javafx.builder.processor.BuilderProcessor").

Is it possible to use this processor ? If yes, how ?

like image 267
gontard Avatar asked Feb 21 '13 14:02

gontard


People also ask

How do I create a builder class in Intellij?

ALT+SHIFT+B inside a file: creates a builder if it does not exist. switches between class and builder if builder exists.

What does builder () build () do?

Builder is a creational design pattern, which allows constructing complex objects step by step. Unlike other creational patterns, Builder doesn't require products to have a common interface. That makes it possible to produce different products using the same construction process.

What is a builder class?

A Builder class builds the final object step by step. This builder is independent of other objects.


1 Answers

Builders are created using annotation processor and now, it is internal.

I've created an issue : http://javafx-jira.kenai.com/browse/RT-28553

which is for a tracking purpose and for a discussion.

like image 196
Alexander Kirov Avatar answered Oct 23 '22 23:10

Alexander Kirov