GWT PojoBuilder

Enables PojoBuilder-generated builders to be used in GWT.

License

License

Categories

Categories

GWT (Google Web Toolkit) User Interface Web Frameworks
GroupId

GroupId

com.thamtech.gwt
ArtifactId

ArtifactId

gwt-pojobuilder
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

gwt-lib
Description

Description

GWT PojoBuilder
Enables PojoBuilder-generated builders to be used in GWT.
Project URL

Project URL

https://github.com/thamtech/gwt-pojobuilder
Source Code Management

Source Code Management

https://github.com/thamtech/gwt-pojobuilder

Download gwt-pojobuilder

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

[OBSOLETE]

GWT PojoBuilder is no longer necessary since GWT support has been enabled in PojoBuilder as of version v4.1.0.


Maven Central Build Status

GWT PojoBuilder - Enables PojoBuilder in GWT

GWT PojoBuilder enables PojoBuilder-generated builders to be used in GWT.

PojoBuilder is a code generator that generates fluent builder classes for POJOs (Plain Old Java Objects). The builders it generates include a clone() method and catch exceptions that are not included in GWT's JRE emulation.

This project includes an implementation of these and a workaround for the clone() override issue.

Get Started

GWT PojoBuilder is available in Maven Central. To use it, add the following dependency to your POM:

<dependency>
  <groupId>com.thamtech.gwt</groupId>
  <artifactId>gwt-pojobuilder</artifactId>
  <version>${gwt-pojobuilder.version}</version>
</dependency>

(Don't forget to include a separate dependency for PojoBuilder.)

In your GWT module, inherit from com.thamtech.gwt.pojobuilder.PojoBuilder:

<module>
  <inherits name="com.thamtech.gwt.pojobuilder.PojoBuilder"/>
</module>

Usage

Set the baseclass of your builder classes to NotCloneableObject:

import com.thamtech.gwt.pojobuilder.client.NotCloneableObject;
...
@GeneratePojoBuilder(withBaseclass=NotCloneableObject.class)
...

If your use case requires your own base class, you will need to ensure that some parent of the generated builder implements the clone() method so that GWT does not complain when it sees the builder class implement @Override public Object clone().

com.thamtech.gwt

Thamtech

Versions

Version
1.0.1
1.0.0