Skip to content

NSString Injection of code #5

@GoogleCodeExporter

Description

@GoogleCodeExporter
While working with NSString test code using the newly generated APIs, I 
realized, that a convenience method toString() would be needed for some of the 
classes like NSString.
It is more likely that a user uses toString() to get the java.lang.String 
object. 
For this, while generating the java code, the method has to be injected in 
special cases. May be an advice like the below might be useful:

<class name="NSString">
 <injected-method name="toString" modifier="public">
   <signature return-type="String">
     <arguments><arguments/>
   </signature>
   <code>
      <![CDATA[return fromNSString(((org_xmlvm_ios_NSObject*) me)->
                                 fields.org_xmlvm_ios_NSObject.wrappedObjCObj);]]>
   </code>
 </injected-method>
</class>

Since the above Advice is useful for both Java API generation as well as C 
wrapper generation, which is an apt place to place this advice?  It would be 
great if you could let me know, if you have enough cycle to work on this should 
this be taken care of in the local copy of xmlvm?

Thanks

Original issue reported on code.google.com by spoorthi.dsilva@gmail.com on 4 Dec 2011 at 10:27

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions