本文整理了Java中java.lang.reflect.InvocationTargetException.fillInStackTrace()
方法的一些代码示例,展示了InvocationTargetException.fillInStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。InvocationTargetException.fillInStackTrace()
方法的具体详情如下:
包路径:java.lang.reflect.InvocationTargetException
类名称:InvocationTargetException
方法名:fillInStackTrace
暂无
代码示例来源:origin: google/j2objc
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: junit-team/junit4
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-itests-client
protected void runTestMethod(Method testMethod) throws Throwable {
try {
testMethod.invoke(this, new Class[0]);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: org.apache.openejb/openejb-itests-client
protected void runTestMethod(final Method testMethod) throws Throwable {
try {
testMethod.invoke(this, new Class[0]);
} catch (final InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (final IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: com.oracle/truffle-tck
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: org.junit/com.springsource.org.junit
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.junit
/**
* Override to run the test and assert its state.
*
* @throws Throwable if any exception is thrown
*/
protected void runTest() throws Throwable {
assertNotNull("TestCase.fName cannot be null", fName); // Some VMs crash when calling getMethod(null,null);
Method runMethod = null;
try {
// use getMethod to get all public inherited
// methods. getDeclaredMethods returns all
// methods of this class but excludes the
// inherited ones.
runMethod = getClass().getMethod(fName, (Class[]) null);
} catch (NoSuchMethodException e) {
fail("Method \"" + fName + "\" not found");
}
if (!Modifier.isPublic(runMethod.getModifiers())) {
fail("Method \"" + fName + "\" should be public");
}
try {
runMethod.invoke(this);
} catch (InvocationTargetException e) {
e.fillInStackTrace();
throw e.getTargetException();
} catch (IllegalAccessException e) {
e.fillInStackTrace();
throw e;
}
}
代码示例来源:origin: org.junit/com.springsource.junit
e.fillInStackTrace();
throw e.getTargetException();
代码示例来源:origin: com.google.android.tools/dx
e.fillInStackTrace();
throw e.getTargetException();
代码示例来源:origin: dragome/dragome-sdk
e.fillInStackTrace();
throw e.getTargetException();
代码示例来源:origin: dragome/dragome-sdk
e.fillInStackTrace();
throw e.getTargetException();
代码示例来源:origin: com.thesett/junit-toolkit
e.fillInStackTrace();
throw e.getTargetException();
代码示例来源:origin: org.dspace.dependencies.jmockit/dspace-jmockit
e.fillInStackTrace();
throw e.getTargetException();
内容来源于网络,如有侵权,请联系作者删除!