Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions articles/flow/production/native.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@

With the annotation, it works as expected. Without it, you would get an empty grid in a natively compiled application. You can have the annotation either on a class or on a method, but not on the constructor.

The same attention should be kept when using POJOs with [classname]`Element` <<{articles}, Properties & Attributes>> or <<{articles}, JavaScript invocation>>; every used custom class must be registered for reflection.

Check failure on line 60 in articles/flow/production/native.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'POJOs'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'POJOs'?", "location": {"path": "articles/flow/production/native.adoc", "range": {"start": {"line": 60, "column": 46}}}, "severity": "ERROR"}
An exception are classes used in <<{articles}/flow/component-internals/client-server-rpc#,Remote Procedure Calls>> API, that are automatically detected and registered for reflection by Vaadin, but only when used with Spring Boot or Quarkus.

For **Quarkus** applications, classes can be registered for reflection by using the [annotationname]`@RegisterForReflection` annotation, either on the class itself or on a separated class using the `targets` attribute. For more information see the https://quarkus.io/guides/writing-native-applications-tips#registerForReflection[Quarkus documentation]

[source,java]
----
@RegisterForReflection
public class Person {
}

// Useful when the class is in a third-party jar
@RegisterForReflection(targets={Person.class})
public class MyReflectionConfiguration {
}
----


== Compilation

Expand Down