Examples of MixinFactory


Examples of de.petris.dynamicaspects.test.aspects.MixInFactory

    public Reen( int i ) {
    }

    private MyMixInInterface getSt() {
        if( fac == null ){
            fac = (MyMixInInterface)new MixInFactory().getInstance();
        }
        return fac;
    }
View Full Code Here

Examples of dynaop.MixinFactory

*/
public class InstanceMixinFactoryTestCase extends TestCase {

    public void testCreate() {
        Object instance = "foo";
        MixinFactory factory = new InstanceMixinFactory(instance);
        assertSame(instance, factory.create(null));
    }
View Full Code Here

Examples of dynaop.MixinFactory

        MixinFactory factory = new InstanceMixinFactory(instance);
        assertSame(instance, factory.create(null));
    }

    public void testPropertiesNotNull() {
        MixinFactory factory = new InstanceMixinFactory("foo");
        assertNotNull(factory.getProperties());
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

     * @param mixinCalledFromLoader
     * @return the factory, put in cache based on mixin class as a key
     */
    public static MixinFactory getFactory(final Class mixinClass, final ClassLoader mixinCalledFromLoader) {
        synchronized (MIXIN_FACTORIES) {
            MixinFactory factory = (MixinFactory) MIXIN_FACTORIES.get(mixinClass);
            if (factory == null) {
                factory = createMixinFactory(mixinClass, mixinCalledFromLoader);
                //by using a lookup by uuid/aspectNickName
                // right now broken since we have 1 container per mixin CLASS while the definition
                // does allow for some mix (several mixin, several container, same mixin class)
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

                containerClass = ContextClassLoader.loadClass(mixinClass.getClassLoader(), DEFAULT_MIXIN_FACTORY);
            } else {
                containerClass = ContextClassLoader.loadClass(mixinClass.getClassLoader(), factoryClassName);
            }
            Constructor constructor = containerClass.getConstructor(new Class[]{Class.class, DeploymentModel.class});
            final MixinFactory factory = (MixinFactory) constructor.newInstance(
                    new Object[]{mixinClass, mixinDefinition.getDeploymentModel()}
            );
            return factory;
        } catch (InvocationTargetException e) {
            throw new DefinitionException(e.getTargetException().toString());
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

     * @param mixinCalledFromLoader
     * @return the factory, put in cache based on mixin class as a key
     */
    public static MixinFactory getFactory(final Class mixinClass, final ClassLoader mixinCalledFromLoader) {
        synchronized (MIXIN_FACTORIES) {
            MixinFactory factory = (MixinFactory) MIXIN_FACTORIES.get(mixinClass);
            if (factory == null) {
                factory = createMixinFactory(mixinClass, mixinCalledFromLoader);
                //by using a lookup by uuid/aspectNickName
                // right now broken since we have 1 container per mixin CLASS while the definition
                // does allow for some mix (several mixin, several container, same mixin class)
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

                containerClass = ContextClassLoader.forName(mixinClass.getClassLoader(), DEFAULT_MIXIN_FACTORY);
            } else {
                containerClass = ContextClassLoader.forName(mixinClass.getClassLoader(), factoryClassName);
            }
            Constructor constructor = containerClass.getConstructor(new Class[]{Class.class, DeploymentModel.class});
            final MixinFactory factory = (MixinFactory) constructor.newInstance(
                    new Object[]{mixinClass, mixinDefinition.getDeploymentModel()}
            );
            return factory;
        } catch (InvocationTargetException e) {
            throw new DefinitionException(e.getTargetException().toString());
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

     * @param mixinCalledFromLoader
     * @return the factory, put in cache based on mixin class as a key
     */
    public static MixinFactory getFactory(final Class mixinClass, final ClassLoader mixinCalledFromLoader) {
        synchronized (MIXIN_FACTORIES) {
            MixinFactory factory = (MixinFactory) MIXIN_FACTORIES.get(mixinClass);
            if (factory == null) {
                factory = createMixinFactory(mixinClass, mixinCalledFromLoader);
                //FIXME by using a lookup by uuid/aspectNickName
                // right now broken since we have 1 container per mixin CLASS while the definition
                // does allow for some mix (several mixin, several container, same mixin class)
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

                containerClass = ContextClassLoader.forName(mixinClass.getClassLoader(), DEFAULT_MIXIN_FACTORY);
            } else {
                containerClass = ContextClassLoader.forName(mixinClass.getClassLoader(), factoryClassName);
            }
            Constructor constructor = containerClass.getConstructor(new Class[]{Class.class, DeploymentModel.class});
            final MixinFactory factory = (MixinFactory) constructor.newInstance(
                    new Object[]{mixinClass, mixinDefinition.getDeploymentModel()}
            );
            return factory;
        } catch (InvocationTargetException e) {
            throw new DefinitionException(e.getTargetException().toString());
View Full Code Here

Examples of org.codehaus.aspectwerkz.aspect.MixinFactory

     * @param klass the class of the mixin
     * @return the factory, put in cache based on mixin class as a key
     */
    public static MixinFactory getFactory(final Class klass) {
        synchronized (MIXIN_FACTORIES) {
            MixinFactory factory = (MixinFactory) MIXIN_FACTORIES.get(klass);
            if (factory == null) {
                factory = createMixinFactory(klass);
                //by using a lookup by uuid/aspectNickName
                // right now broken since we have 1 container per mixin CLASS while the definition
                // does allow for some mix (several mixin, several container, same mixin class)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.