public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
try {
if(method.getDeclaringClass()==Locatable.class)
return method.invoke(this,args);
if(Modifier.isStatic(method.getModifiers()))
// malicious code can pass in a static Method object.
// doing method.invoke() would end up executing it,
// so we need to protect against it.
throw new IllegalArgumentException();
return method.invoke(core,args);
} catch (InvocationTargetException e) {
if(e.getTargetException()!=null)
throw e.getTargetException();
throw e;
}
}
LocatableAnnotation.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:OpenJSharp
作者:
评论列表
文章目录