嘿我正在尝试编写一个基于其泛型参数调用静态函数的函数.
我有以下代码:
public class Model
{
private Document doc;
/*
When the JavaBean is created, a Document object is made using
the Listable parameter. The request string for the specific
type is used to pull XML-data from the cloud.
*/
public Model()
{
try
{
doc = cloud.request(T.getRequestString());
}
catch(Exception e)
{
}
}
/*
getMatches (used in JSP as "foo.matches") generates a list
of objects implementing the Listable interface.
*/
public List getMatches()
{
return T.generateMatches(doc);
}
}
我该怎么做,我只是得到一些关于静态上下文的东西.
‘非静态方法generateMatches(org.jdom.Document)无法从静态上下文中引用’