Last active
August 29, 2015 14:13
-
-
Save eskatos/13b501957778f7dca9bb to your computer and use it in GitHub Desktop.
HelloQi4jWorld.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Mixins( { HelloWorld.Mixin.class } ) | |
public interface HelloWorld | |
{ | |
String say(); | |
interface State | |
{ | |
@NotEmpty Property<String> phrase(); | |
@NotEmpty Property<String> name(); | |
} | |
abstract class Mixin implements HelloWorld | |
{ | |
@This State state; | |
@Override | |
public String say() | |
{ | |
return state.phrase().get() + " " + state.name().get(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shorter than solution of http://qi4j.org/latest/tut-composites.html#tut-composites-step9