예제 #1
0
 public Object findJType(String name) {
   try {
     return ReflectionUtils.invokeMethod(impl, "findJType(java.lang.String)", name);
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #2
0
 public void invalidateRebind(String typeName) {
   try {
     browserShell.getModuleSpace().invalidateRebind(typeName);
   } catch (Throwable e) {
     ReflectionUtils.propagate(e);
   }
 }
 ////////////////////////////////////////////////////////////////////////////
 //
 // Template
 //
 ////////////////////////////////////////////////////////////////////////////
 protected final InputStream getTemplate2(String path) {
   try {
     return Activator.getFile("templates/" + path);
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #4
0
 @SuppressWarnings("rawtypes")
 public void invokeNativeVoid(String string, Class[] classes, Object[] objects) {
   try {
     browserShell.getModuleSpace().invokeNativeVoid(string, null, classes, objects);
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #5
0
 public ClassLoader getClassLoader() {
   // returns CompilingClassLoader
   try {
     return (ClassLoader) ReflectionUtils.invokeMethod2(moduleSpaceHost, "getClassLoader");
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #6
0
 public int getDispId(String member) {
   try {
     return (Integer)
         ReflectionUtils.invokeMethod(
             dispatchIdOracleImpl, "getDispId(java.lang.String)", member);
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #7
0
 ////////////////////////////////////////////////////////////////////////////
 //
 // Java source
 //
 ////////////////////////////////////////////////////////////////////////////
 @Override
 protected String getJavaSourceToAssert() {
   try {
     IType type = m_javaProject.findType("test.client.Test");
     return type.getCompilationUnit().getSource();
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }
예제 #8
0
 public DispatchClassInfo getClassInfoByDispId(int dispId) {
   try {
     final Object dispatchClassInfo =
         ReflectionUtils.invokeMethod(dispatchIdOracleImpl, "getClassInfoByDispId(int)", dispId);
     return new DispatchClassInfo() {
       public Member getMember(int dispId) {
         try {
           return (Member)
               ReflectionUtils.invokeMethod(dispatchClassInfo, "getMember(int)", dispId);
         } catch (Throwable e) {
           throw ReflectionUtils.propagate(e);
         }
       }
     };
   } catch (Throwable e) {
     throw ReflectionUtils.propagate(e);
   }
 }