I got some exposure to custom Java 5 Annotations today and came across a noobie mistake.
Here’s my annotation:
public @interface Annotated {
}
Pretty simple, right?
Here’s a test class that uses the annotation:
import java.lang.annotation.Annotation;
@Annotated
public class Main {
public static void main(String[] args) throws Exception {
for(Annotation ann: Main.class.getAnnotations()) [...]
My name is Theodore Nguyen-Cao. I'm a software engineer and I blog my thoughts on technology and life.