473,379 Members | 1,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

compiler returns error on plugging processor

this is my code logic: I have a JSR 199 (JavaCompiler) that plugs in a processor (processor extends AbstractProcessor), the processor supports the annotation I want to reflect upon, @Worker and supports release 6 of J2SE. Am using NetBeans. The @Worker annotation is implemented a class, Staff, and the @Worker has @Target of TYPE.
Now the problem: when I compile the JSR 199 code, it returns:

E:\Documents and Settings\isaak\My Documents\NetBeansProjects\articles\src\art\Staff. java:14: cannot find symbol
symbol: class Worker
@Worker(value=@Name(firstName="Jules", lastName="Vernon"),
E:\Documents and Settings\isaak\My Documents\NetBeansProjects\articles\src\art\Staff. java:14: cannot find symbol
symbol: class Worker
@Worker(value=@Name(firstName="Jules", lastName="Vernon"),
1 error

now this is my @Worker declaration:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface Worker {
Name value();
enum SeasonEmployed{Spring, Winter, Autumn, Summer}
SeasonEmployed season();
String[] references() default "unavailable";
String townResidence();
}

and the @Name declaration that it nests:
@Target(ElementType.ANNOTATION_TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface Name {
String firstName();
String lastName();
}

and it's implemented by a class, Staff:
@Worker(value=@Name(firstName="Jules", lastName="Vernon"),
season=Worker.SeasonEmployed.Summer,
references={"Site-Mgr", "Works-Mgr"},
townResidence="London")
public class Staff {

private boolean employeeType;

public boolean getEType(){
return employeeType;
}

public Staff(boolean type){
this.employeeType = type;
}
}

can anyone tell me why the compiler is giving that error. The processor's process method is very simple does nothing but call:
for(TypeElement te : annotations)....
print out count of annotations in the element, staff.
That's all.
thanx
May 21 '08 #1
1 1213
Dököll
2,364 Expert 2GB
Where are you with this one, have you made any improvements?

You might want to walk away from it and try again, just stuff I do to clear my thoughts.

Also, please tell us in detail what the project is all about, without the code... perhaps we can tell you another way of achieving it.

Sorry for your troubles!

Dököll
Jun 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bart de boever | last post by:
On some of our Development workstations we get the following error from the visual basic compiler: >>> Visual Basic .NET compiler is unable to recover from the following error: System Error...
13
by: Bryan Parkoff | last post by:
You may notice that switch (...) is much faster than function that can gain a big improved performance because it only use JMP instruction however function is required to use CALL, PUSH, and POP...
40
by: Matt | last post by:
Please skip to the last paragraph if you are in a hurry. Some of the integer variables in my application will need to hold values bigger than 2^32-1. Others won't need to be that big. Time...
15
by: Anton Gavrilov | last post by:
Hi all, I seek your advice on where to start if I want to write a compiler for a toy C-like language I invented (or, rather, am in the process of inventing). Yes, yes, I know I'm crazy and the...
10
by: Ardhendu Nandan | last post by:
I am trying to compile Gcc compiler in Windows O/S.I have downloaded entire source Code of this compiler at tries to run it in DEVCPP but I am gating some linker error and some header files missing...
19
by: petantik | last post by:
Where can I find a good resource, on the web, that will give me a good comprehensive idea of how to write a compiler in C for C or maybe another language. http://petantik.blogsome.com - A...
28
by: sowmiyakc18 | last post by:
Please clear my doubt. When do we declare a variable to be a register variable? What is its significance? What are the conditions to be adhered to when register variables are passed between...
33
by: Nikhil Bokare | last post by:
I wanted a C++ compiler which would follow the ANSI C++ standards. If you could tell me an IDE also, it would be more helpful. Thanks.
10
by: ajaygargnsit | last post by:
Let's say we are using the gcc compiler, and a Pentium 4. Also say there is another machine running same gcc compiler, but a different processor, say Sunsparc. So, now, even though only the processor...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.