I have an interface as below
public interface AccessController {
}
I have a class as below
public class LocalDriver {
WebDriver driver;
public static WebDriver driver() {
if ("need to know?" instanceof AccessController)
return driver;
else
return null;
}
}
Then I have a caller class
public class CallerClass {
public static void main(String[] args) {
LocalDriver.driver();
}
}
Now how do I check if the CallerClass
is aninstanceOf
AccessController
interface
in the driver()
method which is in a different class?