* add compiler flag -Xlint:all, resolve all warnings about unchecked or raw generics
* rename IInstance.get() to IInstance.self() because it better reflects its intention
* move MainTag from manual to generated tags
* remove unnecessary type casts in TagCreator
* Extracted rendering functionality into implementations of HtmlBuilder.
- Two HtmlBuilders are implemented, FlatHtml and IndentedHtml. Each offers the equivalent output as ContainerTag.render() and ContainerTag.renderFormatted.
- Existing implementations of DomContent/Renderable were updated to support HtmlBuilder where possible.
- Attribute was altered to support the use of TagBuilder.
- Config was altered to allow instances to be created, which can be passed into factory methods for the HtmlBuilders. Config.defaults() can be used for library defaults, while Config.global() can be used for current static configuration.
- Retained compatibility with previous library version as much as possible. See RenderingCompatabilityTest.
* Fixing unchecked or unsafe operations
* Removing unnecessary @param from javadoc.
* Improving casting of HtmlBuilders in implementations of DomContent (tags, text, etc.).
* Preventing NPEs when text is null.
Co-authored-by: Oliver Becker <ob@obqo.de>
* split the project in 2, to make it easier to iterate on the code generation without breaking the build. This could also help reduce the compiled size of the library.
* update CONTRIBUTING.md
* try to fix github workflow
* create HtmlTag, BodyTag, HeadTag. hopefully without too large diffs this time.
* add some forgotten variants
* remove 'final' on some methods changed during the last 2 commits, to make it more consistent with the rest of the code
* remove <head>,<body>,<html> from TagCreatorCodeGenerator
* lombok was almost never used. also gave me errors on 'mvn install' on ubuntu 20.04 https://github.com/rzwitserloot/lombok/issues/1651 . unless there are plans to use it more extensively, maybe it is best to remove it, to clean up the dependencies and enable me (and maybe others) to build without errors.
* fix Employee.java without lombok
Using an optional as a condition is really tricky. Even if the optional is not present, the right value of ifValue must be evaluated eagerly in order to be passed to the method. Passing a lambda function for ifFunction allows the value to be evaluated lazily. This avoids the need to manually map and "elseGet" a null value to preserve current functionality.