Method stub
A method stub is a short and simple placeholder for a method that is not yet written for production needs. Generally, a method stub contains just enough code to allow it to be used a declaration with any parameters, and if applicable, a return value.
A method stub may be used to implement an interface that is defined but for which the implementation is not available.
Example
In the following example pseudocode, the function returns a particular value even though ultimately it is supposed to read a value from a hardware source. It returns a valid value, allowing consuming code to be runnable. The function ignores the input parameter which is common for a stub.function ReadThermometer
return 28
'''end function'''
Related
Distributed computing
In distributed computing, stub is like a mock object simulates existing code, such as a procedure on a remote machine. Such stubs can be useful in porting.In RMI nomenclature, a stub on the client-side communicates with a skeleton on the server-side.