Comments (6)
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.
@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.
Looks good - will update my home project when I get home!
from derive4j.
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.
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.
@talios I'm thinking of using the 0
suffix "convention" for package private methods. (eg java.util.Arrays#deepEquals0
).
from derive4j.
Related Issues (20)
- NoSuchElementException after upgrading from 0.10.2 to 1.1.1
- StackOverflow in derivingConfig when @Data annotation is used HOT 1
- Data constructors: allow referencing no yet generated types. HOT 1
- Extension APIs HOT 1
- Could not find instance derivator for fj.Equal and InstanceConfig(Optional.empty, Optional.empty) HOT 2
- @ExportAsPublic does not work correctly on (static) nested classes
- Add Vavr flavour HOT 4
- Improve lazy implementation to support stack-safe evaluation of nested Lazy values
- Ignoring arguments while pattern matching HOT 4
- Random bug : compilation pb with static imports of constructors HOT 4
- Supporting subtypes HOT 4
- Compilation times with Derive4J-generated code HOT 9
- Type classes derivation : wildcards are problematic HOT 2
- DSL example Pass compile but can't run . HOT 5
- Type classes derivation : arrays (or varargs) are problematic HOT 1
- Add Cycops flavour HOT 1
- Feature request: Support Java 11
- Any example about Lens support for VAVR? HOT 4
- Usage in mixed scala/java codebase
- More compact code for equals methods HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from derive4j.