Giter VIP home page Giter VIP logo

Comments (6)

talios avatar talios commented on July 26, 2024

That sounds good! And we can still generate the normal methods as package-private if wanted?

I think that sounds like it should work.

from derive4j.

jbgi avatar jbgi commented on July 26, 2024

@talios: 0.9 has been released with this new feature. See doc at https://github.com/derive4j/derive4j/blob/master/README.md#smart-constructors-and-static-methods-export

from derive4j.

talios avatar talios commented on July 26, 2024

Looks good - will update my home project when I get home!

from derive4j.

talios avatar talios commented on July 26, 2024

In the simple case of just wanting to add simple validation ( reusing the same constructor name and arguments) derive4j will generate broken java:

  // on the generated Links.java
  public static Link full(String rel, String href, Map<String, String> properties) {
    return Link.full(rel, href, properties);
  }

I guess we should either fail gracefully rather than generated broken java, or generate the package private method as something like _full(...).

from derive4j.

jbgi avatar jbgi commented on July 26, 2024

Yeah you are right. Will fix this soon!

Le 11 août 2016 02:06, "Mark Derricutt" [email protected] a écrit :

In the simple case of just wanting to add simple validation ( reusing the
same constructor name and arguments) derive4j will generate broken java:

// on the generated Links.java
public static Link full(String rel, String href, Map<String, String> properties) {
return Link.full(rel, href, properties);
}

I guess we should either fail gracefully rather than generated broken
java, or generate the package private method as something like _full(...).


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#44 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANi6TRbwZYBmwYEK35T7Kf1BH_RYHkhks5qemd6gaJpZM4JfWcf
.

from derive4j.

jbgi avatar jbgi commented on July 26, 2024

@talios I'm thinking of using the 0 suffix "convention" for package private methods. (eg java.util.Arrays#deepEquals0).

from derive4j.

Related Issues (20)

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.