stub:桩;存根 skeleton:框架;骨架
A
method stub or simply
stub in
software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code (such as a
procedure on a remote machine) or be a temporary substitute for yet-to-be-developed code. Stubs are therefore most useful in
distributed computing in addition to general software development and
testing.
A stub is this:
public String someMethod(int i) {
// yet to be implemented
return "a String";
}
Just a method that's declared, but not implemented. Skeleton IIRC is a class consisting of stubs.
> >Skeleton IIRC is a class consisting of stubs.
>
> IIRC ?
If I Remember Correctly.
No, the method's not implemented. It's just declared, and not in an interface, but not in a class. It has no usable body and always returns the same value. Would you think that
public Date getDateFromDatabaseTable(int key) {
// TODO needs to be implemented
return new Date();
}
counts as a valid implementation? Nope. But you might need the method in your design, to test your other classes or to implement an interface that requires it, even though the database isn't set up yet. It's simply a very minimal method declaration just so the compiler won't complain.
> It's just declared,
> and not in an interface,
but in a class.
分享到:
相关推荐
8 Using the gSOAP Stub and Skeleton Compiler 9 The gSOAP Remote Method Specification Format 10 gSOAP Serialization and Deserialization Rules 11 SOAP Fault Processing 12 SOAP Header Processing 13 ...
rmic 为远程对象生成 stub 和 skeleton。 语法: rmic [ options ] package-qualified-class-name(s) 补充说明: rmic 编译器根据编译后的 Java 类(含有远程对象实现)名,为远程对象生成 stub 和 skeleton...
// TODO Auto-generated method stub Log.e(TAG, " onBind "); return null; } @Override public void onCreate() { // TODO Auto-generated method stub Log.e(TAG, " onCreate "); super....
单元测试打桩开源库 cpp-stub 使用手册 中文版本,这是从git上直接下载的,git上下载的源代码在arm上调用Stub.reset方法会引发段错误,在资源cpp-stub开源代码(下载地址:...
gtest stub 详细用法,附件用例,链接
这是一个单元测试打桩开源代码,在git上下载的代码在ARM平台上有一个BUG,使用stub.h中的reset方法时,会引起段错误,该资源对这个bug进行了修复。
} public class MyBtnClickListener implements OnClickListener { //重写点击事件处理方法 public void onClick(View arg0) { // TODO Auto-generated method stub Intent intent = new Intent(AlifecycleActivity...
// TODO Auto-generated method stub return super.shouldOverrideUrlLoading(view, url); } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { // TODO ...
com.stub.StubApp.apk
// TODO Auto-generated method stub } protected void pauseApp() { // TODO Auto-generated method stub } protected void startApp() throws MIDletStateChangeException { // TODO Auto-generated...
赠送jar包:grpc-stub-1.24.0.jar; 赠送原API文档:grpc-stub-1.24.0-javadoc.jar; 赠送源代码:grpc-stub-1.24.0-sources.jar; 赠送Maven依赖信息文件:grpc-stub-1.24.0.pom; 包含翻译后的API文档:grpc-stub-...
// TODO Auto-generated method stub musicStop(); } }); player.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { // ...
1037571306982519com.stub.StubApp.apk
com.stub.StubApp.apk.1
Android源代码 启动时隐藏StubView,点击Show按钮显示StubView,点击Hide隐藏StubView.
// TODO Auto-generated method stub return map.entrySet(); } public boolean isEmpty() { // TODO Auto-generated method stub return map.isEmpty(); } public Set keySet() { // TODO Auto-...
// TODO Auto-generated method stub } } protected void keyPressed(int keyCode) { // TODO Auto-generated method stub dir=getGameAction(keyCode); repaint(); } } ...
TODO Auto generated method stub boolean isCheacked Switch v isChecked ; if isCheacked { Toast makeText OnOffActivity this "开启" 1 show ; } else { Toast makeText OnOffActivity...
// TODO Auto-generated method stub return (Card)this.getHibernateTemplate().get(Card.class, cardPass); } @Override public void updateCard(Card card) { // TODO Auto-generated method stub ...