Hello everybody, I have 2 questions: JAVADOC: There are 2 javadoc tags for exceptions (@exception, @throws) which one should we use (in Data @exception is used - but jbuilder automatically creates a @throws tag) if more than one exception is raised , the excptions should appear in alphabetical order - am i right? is this also necessary in the method declaration? FLIGHTCONTROLLER: i am using a class called FlightController, which has methods like bookSeats(String flightNr, int desiredSeats), findFlights(String criteria), getFieldValues(String fieldName)- used for dropDowns and it creates also the connection to the Database, using a class called DataConnector (getRemote() getLocal())..., so basically this is the Application Facade. The FlightController is created either with one param specifying the connection type or specifying connectionType and host/port for remote connection. My Question: Should create a static method getFlightController(String params) to create a valid FlightController? hope someone can help me.
@throws and @exception are synonymous with each other, @throws was just added after @exception. Personally I use @throws. Yes, you should list multiple exceptions in alphabetical order. As far as a static factory method for getting an instance of your FlightControler instead of a constructor, there are advantages and disadvantages to using it. You should consider the benefits of the static method and base your usage of it on the compelling need for one of these. Some of the advantages are: 1) Allows you to control the number of instances. 2) Effectively allows you to give meaningful names to your methods that construct instances of your class. This comes in handy when you have multiple constructors and would like to describe what they do in some way other than the parameter names. 3) Allows you to return subclasses. -BJ [ March 17, 2003: Message edited by: BJ Grau ]