Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使此代码通用:
public final Object unwrap(Class arg0) { throw new UnsupportedOperationException(); }
它来自 Wrapper 类 (java.sql),最初看起来像这样:
<T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException;
public final <T> T unwrap(Class<T> arg0) throws SQLException { throw new UnsupportedOperationException(); }
这与您粘贴的定义完全相同。