Showing results for 
Search instead for 
Did you mean: 

Bean generation with custom annotations

0 Kudos

I have generated an extension and wrote some functionality to leverage exporting of data.
The export functionality is based on custom annotations.

The objects' classes to be exported are generated via extension-beans.xml.
So the bean definition looks like this

<bean class="">
<import type="" />
<import type=""/>
<annotations>@Annotation1(value = "somevalue")</annotations>
<property name="field1" type="String">
<annotations>@Annotation2(value = "somevalue")</annotations>
<property name="field2" type="String">
<annotations>@Annotation1(value = "someothervalue")</annotations>

The extension where the bean is defined has `<requires-extension name="myextension" />` in its extensioninfo.xml defined and this seems to work.

When running ant all now I get an error with @Annotation1 cannot be resolved to a type.

Question now is, how can I get my custom annotations to be recognized by the generated classes.

Additionally, this is one of my custom annotations

public @interface Annotation1 {
String value(); }

I'm running v2105.15 with Java 11

Accepted Solutions (0)

Answers (0)