Package org.codehaus.plexus.component.configurator.converters.lookup

Examples of org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup


        try
        {
            ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
            ClassLoader loader = JarPluginConfiguration.class.getClassLoader();
            ExpressionEvaluator evaluator = new DefaultExpressionEvaluator();
            ConverterLookup converters = new DefaultConverterLookup();

            PlexusConfiguration settings = null;

            try
            {
View Full Code Here


                throw new ComponentInstantiationException( "Error adding requirement to MapOrientedComponent ", e );
            }
        }

        MapConverter converter = new MapConverter();
        ConverterLookup converterLookup = new DefaultConverterLookup();
        DefaultExpressionEvaluator expressionEvaluator = new DefaultExpressionEvaluator();
        PlexusConfiguration configuration = container.getConfigurationSource().getConfiguration( descriptor );

        if ( configuration != null )
        {
View Full Code Here

        public boolean canCreate( Type type )
        {
            try
            {
                ConverterLookup lookup = createConverterLookup();
                lookup.lookupConverterForType( toClass( type ) );
                return true;
            }
            catch ( ComponentConfigurationException e )
            {
                return false;
View Full Code Here

        protected Object internalCreate( Type expectedType, boolean lazyRefAllowed ) throws ConstructionException
        {
            setComponentStackProperty( child.getName() );
            try
            {
                ConverterLookup lookup = createConverterLookup();
                ConfigurationConverter converter = lookup.lookupConverterForType( toClass( expectedType ) );

                // todo this will not work for static factories
                ObjectRecipe caller = (ObjectRecipe) RecipeHelper.getCaller();
                Class parentClass = toClass( caller.getType() );
View Full Code Here

        }

        private ConverterLookup createConverterLookup()
        {
            ClassRealm realm = (ClassRealm) Thread.currentThread().getContextClassLoader();
            ConverterLookup lookup = new DefaultConverterLookup();
            lookup.registerConverter( new ClassRealmConverter( realm ) );
            return lookup;
        }
View Full Code Here

            mapOrientedComponent.addComponentRequirement(requirement, value);
        }

        MapConverter converter = new MapConverter();
        ConverterLookup converterLookup = new DefaultConverterLookup();
        DefaultExpressionEvaluator expressionEvaluator = new DefaultExpressionEvaluator();
        PlexusConfiguration configuration = container.getConfigurationSource().getConfiguration( descriptor );

        if ( configuration != null )
        {
View Full Code Here

            this.child = child;
        }

        public boolean canCreate(Type type) {
            try {
                ConverterLookup lookup = createConverterLookup();
                lookup.lookupConverterForType(toClass(type));
                return true;
            } catch (ComponentConfigurationException e) {
                return false;
            }
        }
View Full Code Here

        }

        @Override
        protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throws ConstructionException {
            try {
                ConverterLookup lookup = createConverterLookup();
                ConfigurationConverter converter = lookup.lookupConverterForType(toClass(expectedType));

                // todo this will not work for static factories
                ObjectRecipe caller = (ObjectRecipe) RecipeHelper.getCaller();
                Class parentClass = toClass(caller.getType());
View Full Code Here

            }
        }

        private ConverterLookup createConverterLookup() {
            ClassRealm realm = (ClassRealm) Thread.currentThread().getContextClassLoader();
            ConverterLookup lookup = new DefaultConverterLookup();
            lookup.registerConverter( new ClassRealmConverter(realm) );
            return lookup;
        }
View Full Code Here

            mapOrientedComponent.addComponentRequirement(requirement, value);
        }

        MapConverter converter = new MapConverter();
        ConverterLookup converterLookup = new DefaultConverterLookup();
        DefaultExpressionEvaluator expressionEvaluator = new DefaultExpressionEvaluator();
        PlexusConfiguration configuration = container.getConfigurationSource().getConfiguration( descriptor );

        if ( configuration != null )
        {
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup

Copyright © 2018 www.massapicom. 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.