Java方法返回泛型

简单暴力的democode

@SuppressWarnings("unchecked")
public <T> T getTobj(Class<T> cls) {
	return (T)(new Object());
}
相关文章
相关标签/搜索