[#1314] open some too restrictive methods usefull in XJC plugins dev#1860
[#1314] open some too restrictive methods usefull in XJC plugins dev#1860laurentschoelens wants to merge 1 commit intoeclipse-ee4j:masterfrom
Conversation
|
@lukasj for review please. Thanks |
lukasj
left a comment
There was a problem hiding this comment.
what is the use-case for these changes? They look wrong/unnecessary to me.
Note that:
- codemodel has almost no public constructor and all elements can be created either through static
<component>.new...or by calling appropriate method on the element being modeled - there is no public
setParentin the XJC model
so both changes would bring inconsistency to current APIs
|
|
|
there seems to be |
Maybe we should add a |
ce27336 to
044d739
Compare
updated PR according to your remarks |
- add new static method _new for JAnnotationUse in order to create new instance - add new method addProperty(index, prop) on CClassInfo to specify index of property when adding a property on a class (and setParent)
044d739 to
21f9ea1
Compare
lukasj
left a comment
There was a problem hiding this comment.
- changes in CClassInfo look good
- can you remind me why is
_new(JClass clazz): JAnnotationUseneeded? Every element which can be annotated already hasannotatemethod producing the instance of JAnnotationUse (see JAnnotatable interface)
The initial issue was to open the JAnnotationUse constructor, that's why I came with that |
Fixes #1314
_newforJAnnotationUsein order to create new instanceaddProperty(index, prop)onCClassInfoto specify index of property when adding a property on a class (and do the missingsetParentcall)