/** * Set the dependencyBuilder. * * @param dependencyBuilder the dependencyBuilder. * @throws SecurityException if you don't have the ConfigurationPermission */ public void setDependencyBuilder(DependencyBuilder dependencyBuilder) { checkPermissionName("dependencyBuilder"); this.dependencyBuilder = dependencyBuilder; }
public Joinpoint getConstructorJoinPoint(BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData) throws Throwable { return Configurator.getConstructorJoinPoint(config, info, metaData, beanMetaData); }
public MethodJoinpoint getMethodJoinPoint(BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable { return Configurator.findMethod(info, cl, name, parameters, isStatic, isPublic); }
/** * Get the classloader. * * @param beanMetaData the bean meta data * @return meta data's classloader * @throws UndeclaredThrowableException for any error */ protected ClassLoader getClassLoader(BeanMetaData beanMetaData) { try { return Configurator.getClassLoader(beanMetaData); } catch (Throwable t) { throw new UndeclaredThrowableException(t); } }
public BeanInfo getBeanInfo(BeanMetaData metaData) throws Throwable { ClassLoader cl = Configurator.getClassLoader(metaData); String className = metaData.getBean(); if (className == null) return null; return getBeanInfo(className, cl, metaData.getAccessMode()); }
/** * Instantiate and configure a bean * * @param config the confg * @param info the bean info * @param metaData the bean metadata * @return the instantiated and configured object * @throws Throwable for any error */ public static Object instantiateAndConfigure(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable { Object result = instantiate(config, info, metaData); if (metaData != null) configure(result, info, metaData); return result; }
public Joinpoint getConstructorJoinPoint(BeanMetaData metaData) throws Throwable { BeanInfo info = getBeanInfo(metaData); return getConstructorJoinPoint(info, metaData.getConstructor(), metaData); }
/** * Configure a bean property * * @param trace whether trace is enabled * @param object the object to configure * @param info the bean info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(boolean trace, Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType()); configure(trace, object, ainfo, cl, metaData); }
/** * Find a constructor * * @param trace whether trace is enabled * @param info the bean info * @param metaData the constructor metadata * @return the constructor join point * @throws Exception for any error */ public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData) throws Exception { return findConstructor(trace, info, metaData, null); }
/** * Configure a bean property * * @param object the object to configure * @param info the bean info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); configure(trace, object, info, cl, metaData); }
public Joinpoint getConstructorJoinPoint(BeanInfo info) throws Throwable { return getConstructorJoinPoint(info, null, null); }
/** * Get the property info * * @param trace whether trace is enabled * @param info the bean info * @param name the property name * @return the property info * @throws Throwable for any error */ public static PropertyInfo resolveProperty(boolean trace, BeanInfo info, String name) throws Throwable { return resolveProperty(trace, info, null, name, null); }
/** * Constructs a new KernelConfig instance based on the System properties. * <p>If any necessary KernelConfig properties are not found in the System * properties, sensible default implementations for the missing * properties will be used. * @return a new <tt>KernelConfig</tt> instance based on the * System properties. * @see System#getProperties() * @see #newInstance(Properties) */ public static KernelConfig newInstance() { //for the values not found in the System properties, default values //used are from the KernelConstants interface. See //the PropertyKernelConfig class implementation for more details. return newInstance( System.getProperties() ); }
/** * Get the classloader. * * @param beanMetaData the bean meta data * @return meta data's classloader * @throws UndeclaredThrowableException for any error */ protected ClassLoader getClassLoader(BeanMetaData beanMetaData) { try { return Configurator.getClassLoader(beanMetaData); } catch (Throwable t) { throw new UndeclaredThrowableException(t); } }
public Joinpoint getConstructorJoinPoint(BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData, Object object) throws Throwable { return Configurator.getConstructorJoinPoint(config, info, metaData, beanMetaData, object); }
/** * Find a method * * @param info the bean info * @param cl the classloader * @param name the method name * @param parameters the parameter metadata * @param isStatic whether the method is static * @param isPublic whether the method is public * @return the method join point * @throws Throwable for any error */ public static MethodJoinpoint findMethod(BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable { boolean trace = log.isTraceEnabled(); return findMethod(trace, info, cl, name, parameters, isStatic, isPublic); }
/** * Find a constructor * * @param trace whether trace is enabled * @param info the bean info * @param metaData the bean metadata * @return the constructor join point * @throws Exception for any error */ public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, BeanMetaData metaData) throws Exception { return findConstructor(trace, info, metaData.getConstructor()); }
/** * Configure a bean property * * @param object the object to configure * @param info the property info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); configure(trace, object, info, cl, metaData); }
/** * Get the classloader for some BeanMetaData * * @param metaData the metaData * @return the classloader * @throws Throwable for any error */ public static ClassLoader getClassLoader(BeanMetaData metaData) throws Throwable { ClassLoaderMetaData clmd = null; if (metaData != null) clmd = metaData.getClassLoader(); return getClassLoader(clmd); }
/** * Get a constructor joinpoint * * @param config the kernel config * @param info the bean info * @param metaData the constructor metadata * @param beanMetaData the bean metadata * @return the joinpoint * @throws Throwable for any error */ public static Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData) throws Throwable { return getConstructorJoinPoint(config, info, metaData, beanMetaData, null); }