@Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface Gauge
\@Gauge(name = "queueSize")
public int getQueueSize() {
return queue.size;
}
A gauge for the defining class with the name queueSize
will be created which uses the
annotated method's return value as its value.public abstract String name
public abstract boolean absolute
true
, use the given name an as absolute name. If false
, use the given name
relative to the annotated class.Copyright © 2013. All rights reserved.