Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gwt 从RequestContext方法返回Void_Gwt_Requestfactory - Fatal编程技术网

Gwt 从RequestContext方法返回Void

Gwt 从RequestContext方法返回Void,gwt,requestfactory,Gwt,Requestfactory,RequestContext方法中存在的方法能否返回void 如果我的请求上下文如下所示 @Service( value = PersonUtil.class, locator = PersonLocator.class ) public interface PersonRequest extends RequestContext { Request<void> testMethod( Long id ); ...... } @Service(value=Pers

RequestContext方法中存在的方法能否返回void

如果我的请求上下文如下所示

@Service( value = PersonUtil.class, locator = PersonLocator.class )
public interface PersonRequest extends RequestContext
{

    Request<void> testMethod( Long id );
    ......
}
@Service(value=PersonUtil.class,locator=PersonLocator.class)
公共接口PersonRequest扩展了RequestContext
{
请求testMethod(长id);
......
}
我得到这个错误:

这条线上有多个标记 -缺少方法的返回类型 -标记“void”上的语法错误,应为后面的维度

我们不能创建返回类型为void的方法吗?若否,原因为何


提前感谢。

void
就像
int
boolean
等基本类型一样,不能将其用作类型参数


就像你会使用
Integer
而不是
int
,你会在这里使用
Void
java.lang.Void

谢谢。我错过了最基本的东西。