Java Reference
In-Depth Information
Click here to view code image
class GorgeousFormatter implements Formatter { ... }
@PrettyPrinter(GorgeousFormatter.class)
public class Petunia { ... }
// Illegal; String is not a subtype of Formatter
@PrettyPrinter(String.class)
public class Begonia { ... }
Here is an example of a single-element annotation using an enum type defined inside
the annotation type.
Click here to view code image
@Quality(Quality.Level.GOOD)
public class Karma { ... }
Search WWH ::




Custom Search