I have set up an annotation that will be used to keep track of classes, however I am getting an error when I try to compile any java code that uses the annotation.
Here is the annotation code:
package tlib.anno;
import java.lang.annotation.*;
@Retention( RetentionPolicy.RUNTIME )
@Target( ElementType.TYPE )
public @interface Class
{
String author();
String contact();
String creationDate();
String creationTime();
String lastUpdateDate();
String lastUpdateTime();
int version() default 1;
int majorVersion() default 0;
int minorVersion() default 0;
int build() default 1;
}
Then when I try to use the annotation like so:
import tlib.anno.Class;
...
@Class( author = "tjlevine",
creationDate = "2/18/09",
creationTime = "11:20:16 PM",
lastUpdateDate = "2/18/09",
lastUpdateTime = "11:27 PM",
version = 1,
majorVersion = 1,
minorVersion = 0 )
public class Vector2d implements Cloneable
{
...
}
The compiler gives me this error:
/media/disk/programming/java/tLib/src/tlib/math/Vector2d.java:13: annotation tlib.anno.Class is missing contact
Google is of little help with this error, and I can't figure out what it is telling me.