Skip to content

Document how to register runtime hints for convention-based conversion #35178

@sbrannen

Description

@sbrannen

Overview

As a followup to #35156, we decided that it would benefit users if we document how to register runtime hints for convention-based conversion performed by the ObjectToObjectConverter.

An example can be seen in ObjectToObjectConverterRuntimeHints.

TypeReference sqlTimestampTypeReference = TypeReference.of("java.sql.Timestamp");
reflectionHints.registerTypeIfPresent(classLoader, sqlTimestampTypeReference.getName(), hint -> hint
.withMethod("from", List.of(TypeReference.of(Instant.class)), ExecutableMode.INVOKE)
.onReachableType(sqlTimestampTypeReference));

The documentation should reside in the Runtime Hints section of the reference manual.

Related Issues

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions