• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exceptions visibility

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm working on URLyBird and I am not sure what is the "right" visiblity of exceptions defined in suncertify.db. My specification says "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package". Does "member class" mean it is a class with package-private visibility, or does it simply mean it is a class defined in given package, any does not say anything about the expected visibility?

I believe it's the latter but just wanted to make sure I don't miss anything.

Regards,
Tomasz
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tomasz Luchowski:
Hello,

I'm working on URLyBird and I am not sure what is the "right" visiblity of exceptions defined in suncertify.db. My specification says "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package". Does "member class" mean it is a class with package-private visibility, or does it simply mean it is a class defined in given package, any does not say anything about the expected visibility?

I believe it's the latter but just wanted to make sure I don't miss anything.

Regards,
Tomasz



You are right, they should just be member of the db package. Usually, business logic in implemented in another server package. Since this business package uses db layer (i.e. db package), classes (including exceptions) that form an interface (as in concept not java interface) of the db package have to be public as well.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic