• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

May I refactor provided interface?

 
owolabi legz
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The required interface provided by Sun does not use Javadoc comments Am I allowed to refactor the source code in order to use Javadoc? Is there any other allowable way to modify the provided interface?
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Owolabi!

Unfortunately, you can't change the interface provided to you. For instance, you can't change return types or parameter types. But you certainly can use JavaDoc comments. What I did was replace the // code comments of each method by JavaDoc comments. You certainly can do that.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Owolabi,

I left the interface of sun completely unchanged, created my own interface (extending the sun one) to make it possible to add some extra methods and i added also javadoc comments in this interface to the methods of the sun interface.

As long as you don't change/add method signatures and the interface name, you'll be fine i guess.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic