Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "// TODO Auto Generated method stub" mean?

Tags:

java

eclipse

I see it all the time and can't find a simple description.

like image 244
Cole Avatar asked Mar 15 '12 01:03

Cole


People also ask

How do I get rid of Todo auto generated method stub?

If you also don't like the TODO comments you can change the templates via: Window -> Preferences -> Java -> Code Style -> Code Templates. In the code tree you have the templates. Select for example Code → Method Body and press “Edit” to edit this template and to remove the todo comment. I hope this helps.

What is a method stub in Java?

A method stub is a piece of code used to stand in for some other programming functionality in software development. It may simulate the behavior of an existing piece of code, or stand in for code that has not yet been developed.

What are method stubs in Eclipse?

You have the option to have Eclipse generate method stubs (a method stub is a method which is defined but has no statements in it, or no functionality) for various types of methods.


1 Answers

It means that your IDE (or some other tool) has automatically generated a method for you, but has left the body blank to be filled in by you (this is known as a "stub").

In your case, it was probably Eclipse.

like image 131
Oliver Charlesworth Avatar answered Oct 02 '22 00:10

Oliver Charlesworth