Examples of ConverterLookup


Examples of com.thoughtworks.xstream.converters.ConverterLookup

    private XStream(
            final ReflectionProvider reflectionProvider, final HierarchicalStreamDriver driver,
            final ClassLoaderReference classLoader, final Mapper mapper,
            final DefaultConverterLookup defaultConverterLookup) {
        this(reflectionProvider, driver, classLoader, mapper, new ConverterLookup() {
            @Override
            public Converter lookupConverterForType(final Class<?> type) {
                return defaultConverterLookup.lookupConverterForType(type);
            }
        }, new ConverterRegistry() {
View Full Code Here

Examples of cucumber.deps.com.thoughtworks.xstream.converters.ConverterLookup

            if (type instanceof Class) {
                Class clazz = (Class) type;
                if (clazz.isEnum()) {
                    return new EnumConverter(locale, clazz);
                }
                ConverterLookup converterLookup = getConverterLookup();
                Converter converter = converterLookup.lookupConverterForType((Class) type);
                return converter instanceof SingleValueConverter ? (SingleValueConverter) converter : null;
            } else {
                return null;
            }
        }
View Full Code Here

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

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

                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

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

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

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

        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

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

        }

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

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

            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

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

            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

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

        }

        @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
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.