Skip to content

ArC generates a lot of AnnotationLiteral resources #525

@mkouba

Description

@mkouba

ArC needs to generate annotation literals for:

  • bean qualifiers
  • interceptor bindings
  • injected InjectionPoint metadata
  • maybe something else

E.g. for the following injection point:

@Inject
@ConfigProperty(name = "greeting.suffix", defaultValue="!")
String suffix;

ArC generates the following class:

public class ConfigProperty5_AnnotationLiteral extends AnnotationLiteral<ConfigProperty> implements ConfigProperty {
  public String name() {
    return "greeting.suffix";
  }
  public String defaultValue() {
    return "!";
  }
}

ArC can generate shared literals for an annotation type and values but this optimization must be disabled in shamrock because we have two classloaders there - one for app classes and one for framework classes.

We should try to improve this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions