This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 429525 - [DI] Provide access to the actual method and field injection sites
Summary: [DI] Provide access to the actual method and field injection sites
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Brian de Alwis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-03 23:34 EST by Brian de Alwis CLA
Modified: 2014-03-26 15:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2014-03-03 23:34:10 EST
It can be useful for an ExtendedObjectSupplier to be able to retrieve the injection site objects (i.e., the method object for MethodRequestor or the field object for the FieldRequestor) and the associated annotations.  A supplier may use these annotations to further refine or alter their behaviour or the objects to be injected.
Comment 1 Brian de Alwis CLA 2014-03-03 23:38:00 EST
Expose the java.lang.reflect.Method and java.lang.reflect.Field object, and their annotations, on MethodRequestor and FieldRequestor.  These *Requestor implementations are internal classes.

   https://git.eclipse.org/r/22833
Comment 2 Brian de Alwis CLA 2014-03-26 15:23:21 EDT
Revised the implementation to expose the requestor location on the Requestor class.  Requestor is now parameterized with a type that must be an AnnotationElement (e.g., Class, Field, Method, Constructor).  All Requestor subclasses now provide the relevant requestor location.

This information is useful for ExtendedObjectSuppliers if they wish to examine other annotations on the requesting site.

The various *Requestor classes are internal classes, so this change does not change API.  Verified all tests pass.

Committed as:

   http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=f27cc3181ace69e242f177ccc3eefd63e2b55a5f