Are there any provisions already to add description text to @Service POJOs and their methods?
Currently, @Service POJOs descriptions, as seen through the JMX console, are all default or missing:
"Information on the management interface of the MBean"
"Attribute exposed for management"
"(no description)"
Perhaps something along the lines of
--- SNIP ---
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Description {
String[] value();
}
--- SNIP ---
In case of methods, multiple descriptions should be matched with the arguments in sequence.
Another nice-to-have would be a Logger annotation, which helps avoid redundant code (class name replication)
--- SNIP ---
public class SomeService implements SomeServiceIF {
@Logger private static Logger log;
...
--- SNIP ---
instead of
--- SNIP ---
public class SomeService implements SomeServiceIF {
private static Logger log = Logger.getLogger(SomeService.class);
...
--- SNIP ---
Feedback would be appreciated.
Any work in this regard should be coordinated with the JMX JSR efforts in this area.