Results 1 to 6 of 6
Thread: '@' Symbol
- 12-08-2010, 06:45 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 22
- Rep Power
- 0
'@' Symbol
What does the '@' symbol mean?
More specifically:
My best guess is it links to an interface somehow but I have no idea how or why....Java Code:@RemoteView public class aClass ... //rest of class stuff
Thank for any help or links.
~AedonLast edited by AedonetLIRA; 12-08-2010 at 06:56 PM. Reason: Specificity
- 12-08-2010, 06:58 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
- 12-08-2010, 07:02 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 22
- Rep Power
- 0
Ok so in the example I used:
has no real meaning even though RemoteView is a class?Java Code:@RemoteView // an annotation but a class public class aClass ...
- 12-08-2010, 07:05 PM #4
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
eRaaaa Today, 06:58 PM
AedonetLIRA Today 07:02 PM
have you read the links? :eek:
- 12-08-2010, 08:30 PM #5
Member
- Join Date
- Oct 2010
- Posts
- 22
- Rep Power
- 0
I did and understand that they are primarily used for documentation and the three compiler annotations. What I don't get is the last section on the second link, the annotations used by the compiler.
I'm struggling to see how they connect in a program. I'm reviewing a bit of source that creates an interface using two annotations, and then in a seperate class makes an annotation to the interface. Does this connect something?
snippet from what I'm looking at
Java Code:@Target({ ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) public @interface RemoteView { } ... @RemoteView public class Button ...Last edited by AedonetLIRA; 12-08-2010 at 08:34 PM. Reason: Further research
- 12-09-2010, 01:05 AM #6
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
Annotations have a lot of uses (unit testing being a big one - JUnit). As its being retained to runtime, chances are some other class uses reflection to look at the class and decide what to do based on the annotations used on the class.
If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
Similar Threads
-
The $ symbol in a string
By SwissR in forum New To JavaReplies: 9Last Post: 07-23-2010, 05:16 PM -
Can not find symbol ???
By AliceNewbie in forum New To JavaReplies: 1Last Post: 02-17-2010, 01:44 AM -
Yet another Cannot Resolve Symbol
By Gabinka in forum New To JavaReplies: 5Last Post: 03-27-2009, 10:28 PM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
cannot find symbol symbol : class Item location: package platypos.services.order
By officialhopsof in forum New To JavaReplies: 3Last Post: 05-01-2008, 08:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks