[program-java] Re: Java: Annotations

  • From: "Sina Bahram" <sbahram@xxxxxxxxx>
  • To: <program-java@xxxxxxxxxxxxx>
  • Date: Thu, 21 Oct 2010 17:45:28 -0400

Not sure what you're looking for other than the obvious. It suppresses warnings 
about the variable not being used.

Take care,
Sina

________________________________

From: program-java-bounce@xxxxxxxxxxxxx 
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: Thursday, October 21, 2010 9:52 AM
To: 'program-java@xxxxxxxxxxxxx'
Subject: [program-java] Java: Annotations


Hey now:
 
I use Annotations in my EJB projects but I've come across this reference in a 
plain old project "@SuppressWarnings("unused".
 
What does this really mean aside from the obvious. Snippet to follow.
 
MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING
                        | SWT.OK);
                dialog.setText(shell.getText());
                @SuppressWarnings("unused")
                boolean resetFocus = false;
                dialog.setMessage(fiResourceBundle
                        .getResourceString("partD.checkInputPartD"));
                dialog.open();
                
Many thanks.
 
Jim 
 
James M. Corbett
 
Programmer / Analyst | 
Canada Revenue Agency | Agence du revenue du Canada
875 Heron Rd.
Ottawa, On.
K1A0L5 
 
James.Corbett@xxxxxxxxxxxxx
Telephone | Téléphone: (613) 941-1338  
Facsimile | Télécopieur: (613) 941-2261  
 
Government of Canada | Gouvernement du Canada
 


Other related posts: