Error Reading Annotation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emekadavid
    New Member
    • Mar 2007
    • 46

    Error Reading Annotation

    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.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    I haven't got a clue, emekadavid! Have you previoulsy searched this forum for ideas? Please do so, links may be available with perhaps samples you can use. Do stay tuned also, and Google if you could... I would add a little more to the search text though, you'll get more hits on your issue that way.

    Perhaps you can modify to this: java:12: cannot find symbol in addition to your title, how 'bout that! Please ask one of our admins to do it for ya, if you're interested...

    Dököll
    Last edited by Dököll; Jun 12 '08, 03:18 AM. Reason: text to add...

    Comment

    Working...