Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract AbstractClass {
- private Logger logger = LoggerFactory.getLogger(getClass());
- public AbstractClass() {}
- public void execute(ContextObject context) {
- if (logger.debuggingEnabled()) {
- String invokingClassName = ""; // <-- how do I get this?
- logger.debug("Executing {}", invokingClassName);
- }
- // shared application logic is here...
- }
- }
- public MyClass extends AbstractClass {
- public MyClass() {}
- @Override
- public void execute(ContextObject context) {
- super.execute(context);
- // application logic...
- }
- }
- public void execute(ContextObject context) {
- if (logger.debuggingEnabled()) {
- String invokingClassName = ""; // <-- how do I get this?
- logger.debug("Executing {}", this.getClass().getName());
- }
- // shared application logic is here...
- }
- private Logger logger = LoggerFactory.getLogger(getClass());
Add Comment
Please, Sign In to add comment