You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Allen Hackley (JIRA)" <ji...@apache.org> on 2009/12/12 19:51:18 UTC

[jira] Created: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
-------------------------------------------------------------------------------------------------------------------------------

                 Key: FELIX-1941
                 URL: https://issues.apache.org/jira/browse/FELIX-1941
             Project: Felix
          Issue Type: Wish
          Components: iPOJO
    Affects Versions: iPOJO-1.4.0
            Reporter: Allen Hackley


Take the following scenario.

- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for each individual subclass of C, which defeats the purpose of avoiding redundant code.

I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Allen Hackley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790757#action_12790757 ] 

Allen Hackley edited comment on FELIX-1941 at 12/15/09 2:43 PM:
----------------------------------------------------------------

Ok, well thank you for your reply. In the meantime, I'm going to work on either a workaround, or implementing this functionality into my local copy of iPOJO.

Can you point me in the right direction?  I am looking at the CustomAnnotationVisitor, and attempting to ascertain at what stage the annotations are processed.


      was (Author: lordvoid):
    Ok, well thank you for your reply. In the meantime, I'm going to work on either a workaround, or implementing this functionality into my local copy of iPOJO.

  
> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Allen Hackley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790757#action_12790757 ] 

Allen Hackley commented on FELIX-1941:
--------------------------------------

Ok, well thank you for your reply. In the meantime, I'm going to work on either a workaround, or implementing this functionality into my local copy of iPOJO.


> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793010#action_12793010 ] 

Clement Escoffier commented on FELIX-1941:
------------------------------------------

Hi,

The annotations are only the tip of the iceberg. What should be done first is to support hierarchy inside the manipulator itself. It means:
- passing the instance manager to the super class constructor
- replacing field members access by __set and __get method calls
- setting the delegation field correctly
- computing the manipulation metadata
- computing the handler set by analyzing the super-component requirement
- defining overriding rules
- configuring the handlers

Clement

> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Allen Hackley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789778#action_12789778 ] 

Allen Hackley commented on FELIX-1941:
--------------------------------------

It occurs to me that there may arise a scenario where one does not want to inherit the parent field annotations, and so some functionality would need to be added to optionally disable it from occurring.

> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Allen Hackley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allen Hackley updated FELIX-1941:
---------------------------------

    Description: 
Take the following scenario.

- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.

I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

  was:
Take the following scenario.

- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for each individual inherited field within each individual subclass of C, which defeats the purpose of avoiding redundant code.

I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.


> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Allen Hackley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allen Hackley updated FELIX-1941:
---------------------------------

    Description: 
Take the following scenario.

- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for each individual inherited field within each individual subclass of C, which defeats the purpose of avoiding redundant code.

I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

  was:
Take the following scenario.

- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for each individual subclass of C, which defeats the purpose of avoiding redundant code.

I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.


> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1941) Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789904#action_12789904 ] 

Clement Escoffier commented on FELIX-1941:
------------------------------------------

Hello,

What you're asking is just to add the @Inherited meta-annotation on @Requires (and others annotations) ?
Is it something like that ?

@Inherited
public @interface Requires {
...
}

However, this will not enables the superclass injection. Supporting component implementation class inheritance is on the roadmap, but is still not started.

Regards,

Clement


> Make @Requires and any other appropriate annotations inheritable. (Add @Inherited meta-annotation to the annotation definition)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1941
>                 URL: https://issues.apache.org/jira/browse/FELIX-1941
>             Project: Felix
>          Issue Type: Wish
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Allen Hackley
>
> Take the following scenario.
> - Class A and Class B have the same superclass: Class C
> - Class C has one or more fields common to both A and B, to minimize having to write redundant code.
> - Classes A and B are declared to be component types.
> - iPOJO currently will not perform field injection on any of the inherited fields within Class A or Class B, even if Class C is also a component type that explicitly exposes those fields.
> - This results in having to write some combination of xml/annotations/java for each individual inherited field, within each individual subclass of C, which defeats the purpose of avoiding redundant code.
> I have written my own implementation of @Requires that is identical to the original, with the exception of the @Inherited annotation, and this seems to solve the above problem.  It would be nice if it were integrated into the iPOJO core.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.