=== Simple language

==== Using the OGNL notation
When using the OGNL notation from the simple language, the `camel-quarkus-bean` extension should be used.

For instance, the simple expression below is accessing the `getAddress()` method on the message body of type `Client`.
[source,java]
---
simple("${body.address}")
---

In such a situation, one should take an additional dependency on the camel-quarkus-bean extension xref:{cq-camel-components}::bean-component.adoc[as described here].
Note that in native mode, some classes may need to be registered for reflection. In the example above, the `Client` class
needs to be link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered for reflection].

==== Using dynamic type resolution in native mode
When dynamically resolving a type from simple expressions like `${mandatoryBodyAs(TYPE)}`, `${type:package.Enum.CONSTANT}` or `$\{body} is TYPE`, it may be needed to register some classes for reflection manually.

For instance, the simple expression below is dynamically resolving the type `java.nio.ByteBuffer` at runtime:
[source,java]
---
simple("${body} is 'java.nio.ByteBuffer'")
---

As such, the class `java.nio.ByteBuffer` needs to be link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered for reflection].

==== Using the simple language with classpath resources in native mode

If your route is supposed to load a Simple script from classpath, like in the following example

[source,java]
----
from("direct:start").transform().simple("resource:classpath:mysimple.txt");
----

then you need to use Quarkus `quarkus.native.resources.includes` property to include the resource in the native executable
as demonstrated below:

[source,properties]
----
quarkus.native.resources.includes = mysimple.txt
----

More information about selecting resources for inclusion in the native executable can be found at xref:user-guide/native-mode.adoc#embedding-resource-in-native-executable[Embedding resource in native executable].

==== Configuring a custom bean via properties in native mode
When specifying a custom bean via properties in native mode with configuration like `#class:*` or `#type:*`, it may be needed to register some classes for reflection manually.

For instance, the custom bean definition below involves the use of reflection for bean instantiation and setter invocation:
[source,properties]
---
camel.beans.customBeanWithSetterInjection = #class:org.example.PropertiesCustomBeanWithSetterInjection
camel.beans.customBeanWithSetterInjection.counter = 123
---

As such, the class `PropertiesCustomBeanWithSetterInjection` needs to be link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered for reflection], note that field access could be omitted in this case.
