protected Object execute() throws Throwable { return joinpoint.dispatch(); }
/** * Get a field set joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @return the Joinpoint * @throws Throwable for any error */ public static FieldSetJoinpoint getFieldSetJoinpoint(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo); joinpoint.setTarget(object); joinpoint.setValue(value); return joinpoint; }
/** * Get a field get joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @return the Joinpoint * @throws Throwable for any error */ public static FieldGetJoinpoint getFieldGetJoinpoint(Object object, JoinpointFactory jpf, String name) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo); joinpoint.setTarget(object); return joinpoint; }
/** * Invoke a method * * @param object the object to invoke * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the result of the invocation * @throws Throwable for any error */ public static Object invoke(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = getMethodJoinpoint(object, jpf, name, paramTypes, params); return joinpoint.dispatch(); }
/** * Unconfigure a field * * @param object the object to unconfigure * @param jpf the join point factory * @param name the name of the field * @throws Throwable for any error */ public static void unconfigure(Object object, JoinpointFactory jpf, String name) throws Throwable { FieldSetJoinpoint joinpoint = getFieldSetJoinpoint(object, jpf, name, null); joinpoint.dispatch(); }
/** * 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 JoinpointFactory getJoinpointFactory() { JoinpointFactoryBuilder builder = classAdapterFactory.getConfiguration().getJoinpointFactoryBuilder(); return builder.createJoinpointFactory(classInfo); }
/** * Get a field set joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @return the Joinpoint * @throws Throwable for any error */ public static FieldSetJoinpoint getFieldSetJoinpoint(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo); joinpoint.setTarget(object); joinpoint.setValue(value); return joinpoint; }
/** * Get a field get joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @return the Joinpoint * @throws Throwable for any error */ public static FieldGetJoinpoint getFieldGetJoinpoint(Object object, JoinpointFactory jpf, String name) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo); joinpoint.setTarget(object); return joinpoint; }
/** * Invoke a method * * @param object the object to invoke * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the result of the invocation * @throws Throwable for any error */ public static Object invoke(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = getMethodJoinpoint(object, jpf, name, paramTypes, params); return joinpoint.dispatch(); }
/** * Unconfigure a field * * @param object the object to unconfigure * @param jpf the join point factory * @param name the name of the field * @throws Throwable for any error */ public static void unconfigure(Object object, JoinpointFactory jpf, String name) throws Throwable { FieldSetJoinpoint joinpoint = getFieldSetJoinpoint(object, jpf, name, null); joinpoint.dispatch(); }
/** * 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 JoinpointFactory getJoinpointFactory() { JoinpointFactoryBuilder builder = classAdapterFactory.getConfiguration().getJoinpointFactoryBuilder(); return builder.createJoinpointFactory(classInfo); }
public Object invokeStatic(String beanName, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = Config.getStaticMethodJoinpoint(getJoinpointFactory(), beanName, paramTypes, params); return joinpoint.dispatch(); }
/** * Configure a field * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @throws Throwable for any error */ public static void configure(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { FieldSetJoinpoint joinpoint = getFieldSetJoinpoint(object, jpf, name, value); joinpoint.dispatch(); }
public Object newInstance(String[] paramTypes, Object[] params) throws Throwable { ConstructorJoinpoint joinpoint = Config.getConstructorJoinpoint(getJoinpointFactory(), paramTypes, params); return joinpoint.dispatch(); }
public Object invokeStatic(String name, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = Config.getStaticMethodJoinpoint(getJoinpointFactory(), name, paramTypes, params); return joinpoint.dispatch(); }
/** * Configure a field * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @throws Throwable for any error */ public static void configure(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { FieldSetJoinpoint joinpoint = getFieldSetJoinpoint(object, jpf, name, value); joinpoint.dispatch(); }
public Object invoke(Object bean, String beanName, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), beanName, paramTypes, params); return joinpoint.dispatch(); }
public Object invoke(Object bean, String name, String[] paramTypes, Object[] params) throws Throwable { MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params); return joinpoint.dispatch(); }