List of usage examples for java.lang ReflectiveOperationException ReflectiveOperationException
public ReflectiveOperationException(Throwable cause)
From source file:com.reactivetechnologies.platform.rest.AsyncEventReceiverBean.java
private Object invokeServiceMethod(SerializableHttpRequest request) throws ReflectiveOperationException { switch (request.getRequestMethod()) { case "GET": for (MethodInvocationHandler handler : getGetHandlers()) { try { return invokeIfMatch(handler, request); } catch (OperationsException e) { continue; }//from ww w . j av a 2 s . c om } break; case "POST": for (MethodInvocationHandler handler : getPostHandlers()) { try { return invokeIfMatch(handler, request); } catch (OperationsException e) { continue; } } break; case "DELETE": for (MethodInvocationHandler handler : getDeleteHandlers()) { try { return invokeIfMatch(handler, request); } catch (OperationsException e) { continue; } } break; default: break; } throw new ReflectiveOperationException(new UnsupportedOperationException(request.getRequestMethod())); }
From source file:org.apache.drill.exec.store.hive.HiveSubScan.java
public static InputSplit deserializeInputSplit(String base64, String className) throws IOException, ReflectiveOperationException { Constructor<?> constructor = Class.forName(className).getDeclaredConstructor(); if (constructor == null) { throw new ReflectiveOperationException( "Class " + className + " does not implement a default constructor."); }/* ww w. ja v a2 s.c om*/ constructor.setAccessible(true); InputSplit split = (InputSplit) constructor.newInstance(); ByteArrayDataInput byteArrayDataInput = ByteStreams.newDataInput(Base64.decodeBase64(base64)); split.readFields(byteArrayDataInput); return split; }