Произошла неизвестная ошибка Информации нет.Что это может значить?
package com.javarush.task.task32.task3205;
import java.lang.reflect.Proxy;
/*
Создание прокси-объекта
*/
public class Solution {
public static void main(String[] args) {
SomeInterfaceWithMethods obj = getProxy();
obj.stringMethodWithoutArgs();
obj.voidMethodWithIntArg(1);
/* expected output
stringMethodWithoutArgs in
inside stringMethodWithoutArgs
stringMethodWithoutArgs out
voidMethodWithIntArg in
inside voidMethodWithIntArg
inside voidMethodWithoutArgs
voidMethodWithIntArg out
*/
}
public static SomeInterfaceWithMethods getProxy() {
SomeInterfaceWithMethods orr = new SomeInterfaceWithMethodsImpl();
CustomInvocationHandler customInvocationHandler = new CustomInvocationHandler(orr);
SomeInterfaceWithMethods proxy = (SomeInterfaceWithMethods) Proxy.newProxyInstance(orr.getClass().getClassLoader(),orr.getClass().getInterfaces(),customInvocationHandler);
return proxy;
}
}