# Supported Java Features

{% hint style="warning" %}
**This is the manual for older MicroStream versions (Version < 5.0).**

**The new documentation (Version >= 5.0) is located at:**

[https://docs.microstream.one/](https://docs.microstream.one/manual)
{% endhint %}

| Feature                                                                             | Supported                        | Note                                                                                                                                                                  |
| ----------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Classes                                                                             | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Classes without default constructor                                                 | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Abstract classes / Interfaces                                                       | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Perfectly handleable as types, but there can never be instances to be persisted in the first place.                                                                   |
| Inner classes                                                                       | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Anonymous inner classes                                                             | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Primitives                                                                          | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| References                                                                          | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Final fields                                                                        | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Static fields                                                                       | ![](/files/-M4UNsu-vJRarHfVpTgT) | Not supported since they are outside of an entity graph / a database, i.e. potentially shared by multiple graphs.                                                     |
| Constant primitives                                                                 | ![](/files/-M4UNsu-vJRarHfVpTgT) | No sense in persisting those. These are just plain trivial values outside of an entity graph / a database.                                                            |
| Constant instances                                                                  | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Must be registered for loading to update them instead of creating independent new instances.                                                                          |
| Primitive arrays                                                                    | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Object arrays                                                                       | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| Multi dimensional arrays                                                            | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Technically the same as object arrays as every array is an object itself.                                                                                             |
| <p>JDK value types<br>(String, Number types, Date, File, Locale, Optional, ...)</p> | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Optimized handling via custom TypeHandlers.                                                                                                                           |
| Collections                                                                         | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | <p>Via generic handling logic (List, Set, Map, etc.).<br>Optimal handling required tailored TypeHandler (e.g. correctly handling loadFactor in java.util.HashMap)</p> |
| Nested Collections                                                                  | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                                                                                                       |
| <p>JVM system-tied classes<br>(Thread, ClassLoader, WeakReference, ...)</p>         | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Technically handleable, but handling system-instances could cause fatal problems (e.g. start a Thread just from loading data), so it is intentionally disabled.       |
| <p>JVM external-tied classes<br>(IO-Streams, FileChannel, ...)</p>                  | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | 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                      | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Automatically handled as constant instances to maintain referential integrity / identity. |
| Enums with mutable state   | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                           |
| Enums anonymous subclasses | ![](/files/-M4UMPdK-3oJ5AmvKngJ) |                                                                                           |

## Java 8

| Feature | Supported                        | Note                                                                                            |
| ------- | -------------------------------- | ----------------------------------------------------------------------------------------------- |
| Lambdas | ![](/files/-M4UNsu-vJRarHfVpTgT) | Type-handleable in theory. But JVM is not able to resolve its own type definitions for lambdas. |

## Java 14

| Feature | Supported                        | Note                                       |
| ------- | -------------------------------- | ------------------------------------------ |
| Records | ![](/files/-M4UMPdK-3oJ5AmvKngJ) | Records are mere syntax sugar for classes. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.docs.microstream.one/3.0/data-store/addendum/supported-java-features.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
