Skip to content

Instantly share code, notes, and snippets.

@eskatos
Last active August 29, 2015 14:13
Show Gist options
  • Save eskatos/13b501957778f7dca9bb to your computer and use it in GitHub Desktop.
Save eskatos/13b501957778f7dca9bb to your computer and use it in GitHub Desktop.
HelloQi4jWorld.java
@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();
}
}
}
@eskatos
Copy link
Author

eskatos commented Jan 13, 2015

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