Bug 288918 - Add support to InstantiationPolicy to allow Object[] args to be passed to constructor or factory
Summary: Add support to InstantiationPolicy to allow Object[] args to be passed to con...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 04:37 EDT by Doug Clarke CLA
Modified: 2022-06-09 10:19 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 Doug Clarke CLA 2009-09-09 04:37:53 EDT
Minor enhancement to make subclassing the INstantiationPolicy simpler. While working on the Dynamic Persistence incubator I required the ability to create an entity using a subclass of the InstantiationPolicy which invoked a constructor that passed in the entity's type. To do this I copied the entire body of buildNewInstance and added the type into the array passed in during the constructor invocation.

To Do Items
- rename from default constructor to constructor
- change the constructor lookup to allow the policy to specify the args of the constructor
- change the build methods to ask the policy for the Object[] arg values when invoking the constructor or factory
- keep the defaults the same assuming zero args
Comment 1 Doug Clarke CLA 2009-09-09 04:41:19 EDT
- Make the defaultConstructor:

protected Constrcutor constructor;
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:16:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:19:41 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink