Examples of Pluggable


Examples of com.addthis.codec.annotations.Pluggable

        Class<?> findBaseClass = clazz;
        PluginMap findPluginMap = PluginMap.EMPTY;

        Class<?> ptr = clazz;
        while (ptr != null) {
            Pluggable pluggable = ptr.getAnnotation(Pluggable.class);
            if (pluggable != null) {
                String category = pluggable.value();
                findPluginMap = pluginRegistry.asMap().get(category);
                if (findPluginMap != null) {
                    findBaseClass = ptr;
                    break;
                } else {
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

        this.pluginRegistry = pluginRegistry;
    }

    @Override
    public TypeResolverBuilder<?> findTypeResolver(MapperConfig<?> config, AnnotatedClass ac, JavaType baseType) {
        Pluggable pluggable = ac.getAnnotation(Pluggable.class);
        if (pluggable != null) {
            PluginMap pluginMap = pluginRegistry.byCategory().get(pluggable.value());
            if (pluginMap != null) {
                return new CodecTypeResolverBuilder(pluginMap, config.getTypeFactory(), pluginRegistry);
            } else {
                log.warn("missing plugin map for {}, reached from {}", pluggable.value(), ac.getRawType());
            }
        } else if (pluginRegistry.byClass().containsKey(ac.getRawType())) {
            PluginMap pluginMap = pluginRegistry.byClass().get(ac.getRawType());
            return new CodecTypeResolverBuilder(pluginMap, config.getTypeFactory(), pluginRegistry);
        }
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

    }

    /** report all non-alias plugin types */
    @Override
    public List<NamedType> findSubtypes(Annotated a) {
        Pluggable pluggable = a.getAnnotation(Pluggable.class);
        PluginMap pluginMap;
        if (pluggable != null) {
            pluginMap = pluginRegistry.byCategory().get(pluggable.value());
        } else if (pluginRegistry.byClass().containsKey(a.getRawType())) {
            pluginMap = pluginRegistry.byClass().get(a.getRawType());
        } else {
            return null;
        }
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

        Class<?> findBaseClass = clazz;
        PluginMap findPluginMap = PluginMap.EMPTY;

        Class<?> ptr = clazz;
        while (ptr != null) {
            Pluggable pluggable = ptr.getAnnotation(Pluggable.class);
            if (pluggable != null) {
                String category = pluggable.value();
                findPluginMap = pluginRegistry.asMap().get(category);
                if (findPluginMap != null) {
                    findBaseClass = ptr;
                    break;
                } else {
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

        this.pluginRegistry = pluginRegistry;
    }

    @Override
    public TypeResolverBuilder<?> findTypeResolver(MapperConfig<?> config, AnnotatedClass ac, JavaType baseType) {
        Pluggable pluggable = ac.getAnnotation(Pluggable.class);
        if (pluggable != null) {
            PluginMap pluginMap = pluginRegistry.byCategory().get(pluggable.value());
            if (pluginMap != null) {
                return new CodecTypeResolverBuilder(pluginMap, config.getTypeFactory(), pluginRegistry);
            } else {
                log.warn("missing plugin map for {}, reached from {}", pluggable.value(), ac.getRawType());
            }
        }
        return null;
    }
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

    }

    /** report all non-alias plugin types */
    @Override
    public List<NamedType> findSubtypes(Annotated a) {
        Pluggable pluggable = a.getAnnotation(Pluggable.class);
        if (pluggable != null) {
            PluginMap pluginMap = pluginRegistry.byCategory().get(pluggable.value());
            List<NamedType> result = new ArrayList<>(pluginMap.asBiMap().size());
            for (Map.Entry<String, Class<?>> type : pluginMap.asBiMap().entrySet()) {
                result.add(new NamedType(type.getValue(), type.getKey()));
            }
            return result;
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

            if (pluginRegistry.byClass().containsKey(ptr)) {
                findPluginMap = pluginRegistry.byClass().get(ptr);
                findBaseClass = ptr;
                break;
            }
            Pluggable pluggable = ptr.getAnnotation(Pluggable.class);
            if (pluggable != null) {
                String category = pluggable.value();
                findPluginMap = pluginRegistry.asMap().get(category);
                findBaseClass = ptr;
                if (findPluginMap == null) {
                    log.warn("missing plugin map for {}, reached from {}", ptr, clazz);
                    findPluginMap = PluginMap.EMPTY;
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

        Class<?> findBaseClass = clazz;
        PluginMap findPluginMap = PluginMap.EMPTY;

        Class<?> ptr = clazz;
        while (ptr != null) {
            Pluggable pluggable = ptr.getAnnotation(Pluggable.class);
            if (pluggable != null) {
                String category = pluggable.value();
                findPluginMap = pluginRegistry.asMap().get(category);
                if (findPluginMap != null) {
                    findBaseClass = ptr;
                    break;
                } else {
View Full Code Here

Examples of com.addthis.codec.annotations.Pluggable

        PluginMap findPluginMap = PluginMap.EMPTY;

        // get class annotations
        Class<?> ptr = clazz;
        while (ptr != null) {
            Pluggable pluggable = ptr.getAnnotation(Pluggable.class);
            if (pluggable != null) {
                String category = pluggable.value();
                findPluginMap = pluginRegistry.asMap().get(category);
                if (findPluginMap != null) {
                    findBaseClass = ptr;
                    break;
                } else {
View Full Code Here

Examples of name.shamansir.mvp4glayout.client.ui.Pluggable

            Layout layout = getActualLayout();
            PlugsContainer container = layout.getPluggable(where).getContainer();
            if (!(container instanceof HasStatesPanels)) throw new IllegalStateException("Container " + container + " at place " + where + " does not implements HasStatesPanels, so it can not change states");
            HasStatesPanels panels = (HasStatesPanels)container;
            // TODO: check if it is already in this state
            Pluggable plug = panels.getViewFor(state);
            plug.changeState(state);
            layout.plug(where, plug);
        }
    }
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.