package com.sample; import com.intellij.openapi.actionSystem.*; import static com.intellij.openapi.actionSystem.ActionUpdateThread.*; // plain class AwareError implements ActionUpdateThreadAware { } class AwareNoError implements ActionUpdateThreadAware { public ActionUpdateThread getActionUpdateThread() { return EDT; } } // inherited class AwareChildError extends AwareError {} class AwareChildNoError extends AwareNoError {} // anonymous class Holder { ActionUpdateThreadAware awareError = new AwareError() { }; ActionUpdateThreadAware awareNoError = new AwareError() { public ActionUpdateThread getActionUpdateThread() { return EDT; } }; } // default method (applicable) interface WithDefaultMethod extends ActionUpdateThreadAware { default ActionUpdateThread getActionUpdateThread() { return BGT; } } class AwareNoErrorDueDefault implements WithDefaultMethod { }