Package org.elasticsearch.common.inject.internal

Examples of org.elasticsearch.common.inject.internal.MatcherAndConverter


    }

    private void internalConvertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
                                        TypeConverter converter) {
        injector.state.addConverter(
                new MatcherAndConverter(typeMatcher, converter, SourceProvider.UNKNOWN_SOURCE));
    }
View Full Code Here


        injector.state.addConverter(
                new MatcherAndConverter(typeMatcher, converter, SourceProvider.UNKNOWN_SOURCE));
    }

    @Override public Boolean visit(TypeConverterBinding command) {
        injector.state.addConverter(new MatcherAndConverter(
                command.getTypeMatcher(), command.getTypeConverter(), command.getSource()));
        return true;
    }
View Full Code Here

        converters.add(matcherAndConverter);
    }

    public MatcherAndConverter getConverter(
            String stringValue, TypeLiteral<?> type, Errors errors, Object source) {
        MatcherAndConverter matchingConverter = null;
        for (State s = this; s != State.NONE; s = s.parent()) {
            for (MatcherAndConverter converter : s.getConvertersThisLevel()) {
                if (converter.getTypeMatcher().matches(type)) {
                    if (matchingConverter != null) {
                        errors.ambiguousTypeConversion(stringValue, source, type, matchingConverter, converter);
View Full Code Here

    }

    private void internalConvertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
                                        TypeConverter converter) {
        injector.state.addConverter(
                new MatcherAndConverter(typeMatcher, converter, SourceProvider.UNKNOWN_SOURCE));
    }
View Full Code Here

                new MatcherAndConverter(typeMatcher, converter, SourceProvider.UNKNOWN_SOURCE));
    }

    @Override
    public Boolean visit(TypeConverterBinding command) {
        injector.state.addConverter(new MatcherAndConverter(
                command.getTypeMatcher(), command.getTypeConverter(), command.getSource()));
        return true;
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.inject.internal.MatcherAndConverter

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.