Macros are useful.
Therefore, I occasionally bemoan the absence of macros in Java and C#. Macros allow me to force in-line but allow me the code-manageability of non
Take a look at project Lombok - http://projectlombok.org/features/Log.html
It is an annotation library that allows the following code snip-it - which (I believe) is exactly what you are speaking of.
import lombok.extern.slf4j.Log;
@Log
public class LogExample {
public static void main(String... args) {
log.error("Something's wrong here");
}
}
@Log(java.util.List.class)
public class LogExampleOther {
public static void main(String... args) {
log.warn("Something might be wrong here");
}
}