please who can tell me what's wrong with this code. i received the error below:
run-single:
E:\Documents and Settings\isaak\ My Documents\NetBe ansProjects\art icles\src\art\S taff.java:12: cannot find symbol
symbol: class Worker
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
E:\Documents and Settings\isaak\ My Documents\NetBe ansProjects\art icles\src\art\S taff.java:12: cannot find symbol
symbol: class Worker
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
1 error
the annotation, worker:
@Target(Element Type.TYPE)
@Retention(Rete ntionPolicy.CLA SS)
public @interface Worker {
Name value();
enum SeasonEmployed{ Spring, Winter, Autumn, Summer}
SeasonEmployed season();
String[] references() default "unavailabl e";
String townResidence() ;
}
@Target(Element Type.ANNOTATION _TYPE)
@Retention(Rete ntionPolicy.CLA SS)
public @interface Name {
String firstName();
String lastName();
}
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
season=Worker.S easonEmployed.S ummer,
references={"Si te-Mgr", "Works-Mgr"},
townResidence=" London")
public class Staff {
private boolean employeeType;
public boolean getEType(){
return employeeType;
}
public Staff(boolean type){
this.employeeTy pe = type;
}
}
the processor's process method has no code, i just wanted it to return true or false. all the files are in the same package.
run-single:
E:\Documents and Settings\isaak\ My Documents\NetBe ansProjects\art icles\src\art\S taff.java:12: cannot find symbol
symbol: class Worker
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
E:\Documents and Settings\isaak\ My Documents\NetBe ansProjects\art icles\src\art\S taff.java:12: cannot find symbol
symbol: class Worker
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
1 error
the annotation, worker:
@Target(Element Type.TYPE)
@Retention(Rete ntionPolicy.CLA SS)
public @interface Worker {
Name value();
enum SeasonEmployed{ Spring, Winter, Autumn, Summer}
SeasonEmployed season();
String[] references() default "unavailabl e";
String townResidence() ;
}
@Target(Element Type.ANNOTATION _TYPE)
@Retention(Rete ntionPolicy.CLA SS)
public @interface Name {
String firstName();
String lastName();
}
@Worker(value=@ Name(firstName= "Jules", lastName="Verno n"),
season=Worker.S easonEmployed.S ummer,
references={"Si te-Mgr", "Works-Mgr"},
townResidence=" London")
public class Staff {
private boolean employeeType;
public boolean getEType(){
return employeeType;
}
public Staff(boolean type){
this.employeeTy pe = type;
}
}
the processor's process method has no code, i just wanted it to return true or false. all the files are in the same package.
Comment