Comments (4)
Hi,
I tried out your library and I think it is very smart. I need it also to support various commands in combination with parameters/arguments.
I just tried to get rid off guava and the most of it can be replaced with methods of the JDK or a few, small, simple util methods. I think it is also not notable less efficient. There are some lambda-style functional method usages remaining which could get replaced with Lambdas of Java 8. What is your plan to upgrade to Java 8?
from airline.
I think it would be good to replace guava with an upgrade to Java 8. The upgrade to Java 8 is definitely useful in the future (Java 7 will reach end of life). The point in time is just unclear, regarding the airline library. :-)
Here an example of a replacement of guava with Lambdas of Java 8. I'm just preparing a patch without guava.
Before (guava):
options = CollectionUtils.asList(transform(metadataIndex.values(), new Function<Collection, OptionMetadata>()
{
@OverRide
public OptionMetadata apply(@nullable Collection options) {
return new OptionMetadata(options);
}
}));
After (Java 8, Lambda);
options = metadataIndex.values().stream().map(OptionMetadata::new).collect(Collectors.toList());
from airline.
We've started migrating other airlift-related projects to Java 8 already, but haven't got to this one, yet. We're moving in that direction, though, so thanks for working on that patch.
from airline.
Ok, sounds good. I have now created a fork/branch which is working with Java 8 and without guava. The fork can be found here: https://github.com/Novanic/airline
I would be happy, when it could get integrated/pushed to the master. :-) There is one optimization/refactoring within the Parser class left. There is still a very intransparent iterator handling within this class. I try to get this optimized tomorrow or by next week.
from airline.
Related Issues (20)
- help to include allowedValues, and respect multi-line descriptions
- Show default values when showing help HOT 1
- Version 0.7 requires Java 1.7
- Update README.md for latest 0.7 (currently says 0.6) HOT 1
- --help breaks when using required options when using singleCommand() HOT 3
- Automatically show help when user types invalid command? HOT 2
- Does not compile HOT 5
- ParseArgumentsUnexpectedException although following usage HOT 1
- Interactive command line HOT 2
- Conflicting arguments, although they don't conflict HOT 1
- NPE when running "help" when argument is marked as hidden
- Feature Request: Support for Kotlin types
- Information about Inheritance and Composition HOT 2
- Upgrade to Guava 24.1+ HOT 7
- ParseOptionConversionException is not transporting the cause HOT 2
- group-aware help
- Cli.commandFactory is never used?
- Allow mutually exclusive required options HOT 5
- Java Server Overloaded
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 airline.