Supported Java Features

Feature Supported Note

Classes

symbol check

Classes without default constructor

symbol check

Abstract classes / Interfaces

symbol check

Perfectly handleable as types, but there can never be instances to be persisted in the first place.

Inner classes

symbol check

Anonymous inner classes

symbol check

Primitives

symbol check

References

symbol check

Final fields

symbol check

Static fields

symbol remove

Not supported since they are outside of an entity graph / a database, i.e. potentially shared by multiple graphs.

Constant primitives

symbol remove

No sense in persisting those. These are just plain trivial values outside of an entity graph / a database.

Constant instances

symbol check

Must be registered for loading to update them instead of creating independent new instances.

Primitive arrays

symbol check

Object arrays

symbol check

Multi dimensional arrays

symbol check

Technically the same as object arrays as every array is an object itself.

JDK value types (String, Number types, Date, File, Locale, Optional, …​)

symbol check

Optimized handling via custom TypeHandlers.

Collections

symbol check

Via generic handling logic (List, Set, Map, etc.). Optimal handling required tailored TypeHandler (e.g. correctly handling loadFactor in java.util.HashMap)

Nested Collections

symbol check

JVM system-tied classes (Thread, ClassLoader, WeakReference, …​)

symbol check

Technically handleable, but handling system-instances could cause fatal problems (e.g. start a Thread just from loading data), so it is intentionally disabled.

JVM external-tied classes (IO-Streams, FileChannel, …​)

symbol check

Technically handleable, but external dependencies could cause fatal problems (e.g. existence of a referenced file), so it is intentionally disabled.

Java 5

Feature Supported Note

Enums

symbol check

Automatically handled as constant instances to maintain referential integrity / identity.

Enums with mutable state

symbol check

Enums anonymous subclasses

symbol check

Java 8

Feature Supported Note

Lambdas

symbol remove

Type-handleable in theory. But JVM is not able to resolve its own type definitions for lambdas.

Java 14

Feature Supported Note

Records

symbol check

Records are mere syntax sugar for classes, see FAQ.

Java 17

Feature Supported Note

Immutable Set

symbol check

Automatically handled until Java 14, for Java 15 and later use the persistence-binary-jdk17 module, see persistence-binary-jdk17

Immutable List

symbol check

Automatically handled until Java 14, for Java 15 and later use the persistence-binary-jdk17 module, see persistence-binary-jdk17