Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 8 default methods #25

Open
johnwright opened this issue Mar 10, 2016 · 1 comment
Open

Support Java 8 default methods #25

johnwright opened this issue Mar 10, 2016 · 1 comment

Comments

@johnwright
Copy link
Member

As a better, more strongly-typed alternative to the @Default annotation.

interface Config {
    default int port() {
        return 9001;
    }
}

Config config = Envy.configure(Config.class);
assert config.port() == 9001;

System.setPropery("port", 7777);
Config config = Envy.configure(Config.class);
assert config.port() == 7777;
@johnwright
Copy link
Member Author

Depends on #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant