Giter VIP home page Giter VIP logo

mxjc's People

Contributors

4everalone avatar bulldog2011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mxjc's Issues

Adding copyWithZone when generating files for Pico using mxjc

Hi there,

We've been using mxjc to generate objective-c files for Pico based on our XSD file. Are there any plans to implement - (id)copyWithZone:(NSZone *)zone to the auto-generated files coming from mxjc? This could be very useful when using "copy" for your @Property declarations.

The workaround right now is to either manually implement copyWithZone after the files are generated (overwriting files becomes an issue with this route) or implementing a category that takes care of copyWithZone for that particular class.

Thanks!
Alex

Imported javax.xml.bind.JAXBElement;

No copy of realization of JAXBElement template

// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ws.schema;

import java.io.Serializable;
import com.leansoft.nano.annotation.*;
import javax.xml.bind.JAXBElement;
import java.util.List;
import org.w3c.dom.Element;

@com.leansoft.nano.annotation.RootElement(name = "InfoResponseData", namespace = "ws/schema")
public class InfoResponseData implements Serializable {

    private static final long serialVersionUID = -1L;

    @com.leansoft.nano.annotation.Element(name = "User")
    @Order(value=0)
    public User userInfo;   

    @com.leansoft.nano.annotation.Element
    @Order(value=1)
    public int errCode; 

    @AnyElement
    @Order(value=2)
    public JAXBElement<InfoExt> infoExt;    

    @AnyElement
    @Order(value=3)
    public List<Element> any;   
}

Schema:

  <xs:complexType name="InfoResponseData">
    <xs:sequence>
      <xs:element name="UserInfo" type="tns:User"/>
      <xs:element name="errCode" type="xs:int"/>
      <xs:element name="InfoExt" type="tns:InfoExt" nillable="true" minOccurs="0"/>
      <xs:any processContents="skip" namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.