2012-02-23 9 views

答えて

3

は(プレーンリフレクションを使用して)、これを試してみてください:

Class<?>[] interfaces = proxyInstance.getClass().getInterfaces(); 

次のコードの場合:

Object proxyInstance = Proxy.newProxyInstance(
    getClass().getClassLoader(), 
    new Class<?>[] {Serializable.class}, 
    new InvocationHandler() /**/); 

それは正しくjava.io.Serializableインタフェースを返します。

関連する問題