Examples of PlasticClassTransformer


Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        return result;
    }

    private <T> ClassInstantiator<T> createInstantiator(final Class<T> interfaceType)
    {
        return proxyFactory.createProxy(interfaceType, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                final PlasticField objectCreatorField = plasticClass.introduceField(ObjectCreator.class, "creator")
                        .injectFromInstanceContext();
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        if (!propertyType.isAssignableFrom(adapter.getType()))
            throw new RuntimeException(ServiceMessages.propertyTypeMismatch(propertyName, sourceClass,
                    adapter.getType(), propertyType));

        ClassInstantiator instantiator = proxyFactory.createProxy(propertyType, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                final PlasticField sourceField = plasticClass.introduceField(sourceClass, "source").inject(source);
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        return instantiator.with(filterInterface, filter).with(serviceInterface, nextBridge).newInstance();
    }

    private void createInstantiator()
    {
        instantiator = proxyFactory.createProxy(serviceInterface, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                PlasticField filterField = plasticClass.introduceField(filterInterface, "filter")
                        .injectFromInstanceContext();
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        this.environment = environment;
    }

    public <T> T build(final Class<T> serviceType)
    {
        ClassInstantiator<T> instantiator = proxyFactory.createProxy(serviceType, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                PlasticMethod delegateMethod = plasticClass.introducePrivateMethod(
                        PlasticUtils.toTypeName(serviceType), "delegate", null, null);
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        return build(registry);
    }

    private <S> S createProxy(final Class<S> interfaceType, final StrategyRegistry<S> registry)
    {
        ClassInstantiator instantiator = proxyFactory.createProxy(interfaceType, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
                        .inject(registry);
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

    /**
     * Creates a class and an instance of that class. Updates the cache and returns the instance.
     */
    private <S> S createInstance(final Class<S> serviceInterface)
    {
        ClassInstantiator instantiator = proxyFactory.createProxy(serviceInterface, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                plasticClass.addToString(String.format("<NoOp %s>", serviceInterface.getName()));
            }
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        Object[] array = (Object[]) Array.newInstance(commandInterface, commands.size());

        final Object[] commandsArray = commands.toArray(array);

        ClassInstantiator<T> instantiator = proxyFactory.createProxy(commandInterface, new PlasticClassTransformer()
        {
            public void transform(PlasticClass plasticClass)
            {
                PlasticField commandsField = plasticClass.introduceField(commandsArray.getClass(), "commands").inject(
                        commandsArray);
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        return result;
    }

    private <T> ClassInstantiator<T> createInstantiator(final Class<T> interfaceType)
    {
        return proxyFactory.createProxy(interfaceType, new PlasticClassTransformer()
        {
            @Override
            public void transform(PlasticClass plasticClass)
            {
                final PlasticField objectCreatorField = plasticClass.introduceField(ObjectCreator.class, "creator")
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

        return build(registry);
    }

    private <S> S createProxy(final Class<S> interfaceType, final StrategyRegistry<S> registry)
    {
        ClassInstantiator instantiator = proxyFactory.createProxy(interfaceType, new PlasticClassTransformer()
        {
            @Override
            public void transform(PlasticClass plasticClass)
            {
                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
View Full Code Here

Examples of org.apache.tapestry5.plastic.PlasticClassTransformer

    /**
     * Creates a class and an instance of that class. Updates the cache and returns the instance.
     */
    private <S> S createInstance(final Class<S> serviceInterface)
    {
        ClassInstantiator instantiator = proxyFactory.createProxy(serviceInterface, new PlasticClassTransformer()
        {
            @Override
            public void transform(PlasticClass plasticClass)
            {
                plasticClass.addToString(String.format("<NoOp %s>", serviceInterface.getName()));
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.