假设我有
abstract class Base {
protected static final Logger LOGGER = LoggerFactory.getLogger(/* What do I do here */);
}
扩展它的两个类:
class A extends Base {
// I want to have access to LOGGER with A.class classname
}
class B extends Base {
// I want to have access to LOGGER with B.class classname
}
这可以不使用模板变量吗?