Skip to content

Instantly share code, notes, and snippets.

@vegegoku
Created January 12, 2018 19:23
Show Gist options
  • Save vegegoku/6bcae1ce42d93835bf25e015e4fccb8f to your computer and use it in GitHub Desktop.
Save vegegoku/6bcae1ce42d93835bf25e015e4fccb8f to your computer and use it in GitHub Desktop.
Inject context without super sourcing
public class Base {
private static final Logger LOGGER=Logger.getLogger(Base.class.getName());
public void log(){
LOGGER.info("Hello from JS base....");
}
}
public void onModuleLoad() {
JavaBase base=new JavaBase();
base.log();//will log Hello from JS base....
}
public class JavaBase extends Base {
private static final Logger LOGGER=Logger.getLogger(JavaBase.class.getName());
@GwtIncompatible
@Override
public void log() {
LOGGER.info("Hello from Java base-----");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment