This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 308367 - Support for enums needed in Dynamic Persistence
Summary: Support for enums needed in Dynamic Persistence
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Mike Norman CLA
QA Contact:
URL:
Whiteboard: dynamic
Keywords:
Depends on:
Blocks: 296967
  Show dependency tree
 
Reported: 2010-04-07 13:19 EDT by Rick Barkhouse CLA
Modified: 2022-06-09 10:07 EDT (History)
4 users (show)

See Also:


Attachments
Prototype from Rick (8.70 KB, patch)
2010-04-19 11:18 EDT, Rick Barkhouse CLA
no flags Details | Diff
Support for Enums with Dynamic Entities (28.47 KB, patch)
2010-04-20 14:15 EDT, Mike Norman CLA
no flags Details | Diff
Changed addEnum to take varargs of Objects (8.32 KB, patch)
2010-04-20 14:47 EDT, Rick Barkhouse CLA
no flags Details | Diff
Changed addEnum to take varargs of Objects (2.40 KB, patch)
2010-04-20 14:49 EDT, Rick Barkhouse CLA
no flags Details | Diff
Support for Enums with Dynamic Entities (28.62 KB, patch)
2010-04-20 15:00 EDT, Mike Norman CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Barkhouse CLA 2010-04-07 13:19:45 EDT
In order to support the XmlEnum annotation in JAXB, we would need the ability to generate dynamic enums as well as classes.  Currently you can build a DynamicEntity representing an enum, but DynamicEntity itself is a class and will not be usable where an enum is needed.

This support could be added on DynamicClassLoader, e.g.:

DynamicEntity myEnum = dynamicClassLoader.createDynamicEnum(enumClassName);

Could we have a new implementation of DynamicEntity, i.e. DynamicEnumImpl?

Some info for generating enums from ASM can be found here:
http://old.nabble.com/Creating-enums-with-asm-td20953442.html
Comment 1 Rick Barkhouse CLA 2010-04-19 11:18:24 EDT
Created attachment 165298 [details]
Prototype from Rick
Comment 2 Mike Norman CLA 2010-04-20 14:15:33 EDT
Created attachment 165472 [details]
Support for Enums with Dynamic Entities
Comment 3 Rick Barkhouse CLA 2010-04-20 14:47:25 EDT
Created attachment 165477 [details]
Changed addEnum to take varargs of Objects
Comment 4 Rick Barkhouse CLA 2010-04-20 14:49:35 EDT
Created attachment 165478 [details]
Changed addEnum to take varargs of Objects
Comment 5 Mike Norman CLA 2010-04-20 15:00:50 EDT
Created attachment 165482 [details]
Support for Enums with Dynamic Entities

final version of patch
Comment 6 Mike Norman CLA 2010-04-20 15:12:14 EDT
checked into SVN: revision 7022

reviewed by Rick (as well as discussion with Blaise)
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:07:12 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink