/** * Instantiate an object * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the instantiated object * @throws Throwable for any error */ public static Object instantiate(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { ConstructorJoinpoint joinpoint = getConstructorJoinpoint(jpf, paramTypes, params); return joinpoint.dispatch(); }
ConstructorInfo cinfo = joinPoint.getConstructorInfo(); joinPoint.setArguments(params);
/** * Get a constructor Joinpoint * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the Joinpoint * @throws Throwable for any error */ public static ConstructorJoinpoint getConstructorJoinpoint(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { if (paramTypes == null) paramTypes = NO_PARAMS_TYPES; if (params == null) params = NO_PARAMS; boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params)); ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes); ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo); joinpoint.setArguments(params); return joinpoint; }
/** * Get a constructor Joinpoint * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the Joinpoint * @throws Throwable for any error */ public static ConstructorJoinpoint getConstructorJoinpoint(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { if (paramTypes == null) paramTypes = NO_PARAMS_TYPES; if (params == null) params = NO_PARAMS; boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params)); ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes); ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo); joinpoint.setArguments(params); return joinpoint; }
/** * Instantiate an object * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the instantiated object * @throws Throwable for any error */ public static Object instantiate(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { ConstructorJoinpoint joinpoint = getConstructorJoinpoint(jpf, paramTypes, params); return joinpoint.dispatch(); }
public Object newInstance(String[] paramTypes, Object[] params) throws Throwable { ConstructorJoinpoint joinpoint = Config.getConstructorJoinpoint(getJoinpointFactory(), paramTypes, params); return joinpoint.dispatch(); }
public Object newInstance(String[] paramTypes, Object[] params) throws Throwable { ConstructorJoinpoint joinpoint = Config.getConstructorJoinpoint(getJoinpointFactory(), paramTypes, params); return joinpoint.dispatch(); }