[
https://issues.apache.org/jira/browse/FELIX-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789765#action_12789765
]
Richard S. Hall commented on FELIX-1940:
----------------------------------------
The issue is where would you suggest to attach an "@Instance" annotation?
An initial thought might be to attach it to the component class, but that would
limit reusability because it presupposes that it knows how to instantiate the
component in every situation in which it will be used.
Component declarations are purely type declarations, so it doesn't make sense
to mix types and instance configuration, since they are at two different
levels. If the goal is simply to avoid XML, then we'd need some way to
represent the application configuration in Java.
One possibility is to create some new annotation (e.g.,
@ApplicationConfiguration) which can be attached to some arbitrary class which
allows you to specify component instances to be created.
> Add @Instance annotation to declare instances without metadata.xml
> ------------------------------------------------------------------
>
> Key: FELIX-1940
> URL: https://issues.apache.org/jira/browse/FELIX-1940
> Project: Felix
> Issue Type: Wish
> Components: iPOJO
> Affects Versions: iPOJO-1.4.0
> Reporter: Allen Hackley
> Priority: Minor
>
> Currently, instances cannot be declared using annotations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.