Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-16-2008, 01:32 PM
Member
 
Join Date: Jan 2008
Posts: 4
ibmzz is on a distinguished road
Send a message via MSN to ibmzz
why does a variable be bracketted in double @val@!Thank you
I have download a open-source coded in Java from sourceforge websit,
There are some source code like this

public final static int CURRENT_OPTIMIZATION = @optimizationLevel@;
public final static int OBJECT_ACTIVITY_TIMEOUT = @oectActivityTimeout@;
if (@waitForTransactions@ == true) {
setupShutdownHook();
}
why does a variable a bracked in double ·@·,what does this mean? I have used java for coding few month, please give some advice,Thank you
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-16-2008, 02:16 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Hello ibmzz. Welcome to the forums!

I did a Google search and I found that the @ symbol, pronounced AT (Annotation Type) is used in Java for annotations. It serves as important documentation for the users of the code and the compiler. Read this interesting article that I found:
Annotations (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
One of our members, roots, like to use annotations in his/her code. Maybe he/she can teach us a thing or two about them.
__________________
If your ship has not come in yet then build a lighthouse.

Last edited by tim : 01-16-2008 at 02:25 PM.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 01:59 AM
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 102
wsaryada is on a distinguished road
Just a guess, I think that this @varName@ notation is used in the code because the owner of the code want to find-and-replace the value "@varName@" later on using a build script such as ant.
__________________
Website:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-19-2008, 10:38 AM
Member
 
Join Date: Jan 2008
Posts: 4
ibmzz is on a distinguished road
Send a message via MSN to ibmzz
Mr. wsaryada,Thank you for you giving me some advices about the problem of @valname@.
It is no question , this must be the ant compiling parameters, I am a junior for java coding. if I use ant utilities to build java programm even a very simple one just like "Hello world"(only have a input and output) the hello.java is writtinig like this:
class Hello {
public static void main(String args[]){
String inVal = @inputVal@;
System.out.println("This is the ant built reflect:"+inVal);
}
}
How can i use Eclipse to built the program with the ant utilities?
Would you mind giving me some advices about this?(my target is wo remove the syntex error in Eclipse IDE , and make it runnable )
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating sin of a double value Java Tip Java Tips 0 01-13-2008 10:13 PM
transforming double to int AlejandroPenton New To Java 2 12-11-2007 03:34 AM
Getting smallest possible Double value Java Tip Java Tips 0 12-06-2007 04:15 PM
How to round a double? Valeriano New To Java 1 05-31-2007 05:50 PM
How to determine if the value of a JTextField is double nemo New To Java 1 05-20-2007 01:19 PM


All times are GMT +3. The time now is 10:53 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org