Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 959808

Pages: 1
JavaWorld
addict


Reged: 06/20/03
Posts: 482
An annotation-based persistence framework
      #16412 - 03/20/05 01:16 PM

An annotation-based persistence framework

Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: An annotation-based persistence framework [Re: JavaWorld]
      #16436 - 03/21/05 08:13 AM

Quote:

Consider the situation where you extend one of the Abstract Window Toolkit (AWT)/Swing Adapter classes and accidentally misspell a base-class method name.
....
public class myListener implements MouseListener
{
@Overrides
void MousePressed(MouseEvent e)
{ System.out.println("Mouse button clicked!");
}
}





The compiler would have flagged your code sample even without the @Overrides annotation as you are implementing the MouseListener interface. You mentioned the Adapter class in the text but the sample code did not reflect what you wrote.


Post Extras: Print Post   Remind Me!   Notify Moderator  
brindy
Unregistered




Re: An annotation-based persistence framework [Re: Anonymous]
      #42512 - 01/16/07 03:07 AM

true, but this would be more useful if you were extending MouseAdapter instead of implementing MouseListener (which is a more sensible approach if you don't need to implement all the methods of that interface).

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5762

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5