@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Timed
\@Timed(name = "fancyName")
public String fancyName(String name) {
return "Sir Captain " + name;
}
A timer for the defining class with the name fancyName
will be created and each time the
#fancyName(String)
method is invoked, the method's execution will be timed.public abstract String name
Copyright © 2015. All rights reserved.