/** * @return the {@link Constructor} corresponding to the given {@link JvmConstructor} or <code>null</code>. */ public Constructor<?> getConstructor(JvmConstructor constructor) { Class<?> declaringType = getRawType(constructor.getDeclaringType()); if (declaringType == null) return null; Class<?>[] paramTypes = getParamTypes(constructor); try { return declaringType.getDeclaredConstructor(paramTypes); } catch (Exception e) { if (log.isDebugEnabled()) log.debug(e.getMessage(), e); } return null; }
/** * @return the {@link Constructor} corresponding to the given {@link JvmConstructor} or <code>null</code>. */ public Constructor<?> getConstructor(JvmConstructor constructor) { Class<?> declaringType = getRawType(constructor.getDeclaringType()); if (declaringType == null) return null; Class<?>[] paramTypes = getParamTypes(constructor); try { return declaringType.getDeclaredConstructor(paramTypes); } catch (Exception e) { if (log.isDebugEnabled()) log.debug(e.getMessage(), e); } return null; }
/** * @return the {@link Method} corresponding to the given {@link JvmOperation} or <code>null</code>. */ public Method getMethod(JvmOperation operation) { Class<?> declaringType = getRawType(operation.getDeclaringType()); if (declaringType == null) return null; Class<?>[] paramTypes = getParamTypes(operation); try { return declaringType.getDeclaredMethod(operation.getSimpleName(), paramTypes); } catch (Exception e) { if (log.isDebugEnabled()) log.debug(e.getMessage(), e); } return null; }
/** * @return the {@link Method} corresponding to the given {@link JvmOperation} or <code>null</code>. */ public Method getMethod(JvmOperation operation) { Class<?> declaringType = getRawType(operation.getDeclaringType()); if (declaringType == null) return null; Class<?>[] paramTypes = getParamTypes(operation); try { return declaringType.getDeclaredMethod(operation.getSimpleName(), paramTypes); } catch (Exception e) { if (log.isDebugEnabled()) log.debug(e.getMessage(), e); } return null; }