Skip to content

Instantly share code, notes, and snippets.

@bitbrain
Created October 7, 2014 14:04
Show Gist options
  • Save bitbrain/4bc8168deb96fc5e7f6b to your computer and use it in GitHub Desktop.
Save bitbrain/4bc8168deb96fc5e7f6b to your computer and use it in GitHub Desktop.
package de.bitbrain.guice;
import com.google.inject.Inject;
public abstract class State {
@Inject
private Renderer renderer;
@Inject
private RendererUser user;
public void enter() {
System.out.println("Enter " + getClass().getName() + " with renderer " + renderer.toString());
user.info();
}
public void leave() {
System.out.println("Leave " + getClass().getName());
}
public void run() {
System.out.println("Run " + getClass().getName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment