← back to UniJ README
Table of Contents:
-
API:
If you wonder how UniJ's indirection (= its two extra layers: User API and Service API) affects performance, the answer is short: it effectively doesn't.
It turns out the JIT compiler simply optimizes all the indirection away.
You can verify this by running a JMH benchmark
(UniListsBenchmark
)
where calls to UniLists
(with a JDK 11 binding) are compared to direct JDK 11 API calls. The exact results can be
found here.
This library is highly interoperable with Kotlin thanks to being annotated with regard to:
- nullability (
@NonNullPackage
) - mutability (
@ReadOnly
)
using annotations provided by Basic Java Annotations library.
If you're looking for a backport of Java 9+ to Java 8, you can use the following for:
-
new APIs: UniJ
- UniJ JDK 8 bundle (
pl.tlinkowski.unij.bundle.jdk8
) is effectively a backport of some of the JDK 9+ APIs to JDK 8 (see End Users Stuck on JDK 8 for details)
- UniJ JDK 8 bundle (
-
new language features: Jabel
- Jabel is an annotation processor that lets you use some language features of Java 9+ while still targeting JDK 8
-
Java Platform Module System: Gradle Modules Plugin
- Gradle Modules Plugin provides support for JPMS (
module-info.java
) not only to JDK 9+ projects (standard mode) but also to JDK 8 projects (special mixed mode)
- Gradle Modules Plugin provides support for JPMS (
Together, UniJ, Jabel, and Gradle Modules Plugin may provide you with pretty good "Java 9+"-like experience while still targeting / being on JDK 8.
← back to UniJ README