Package groovy.util.slurpersupport

Examples of groovy.util.slurpersupport.GPathResult.text()


            if (key.equals("children")) {
                return node.children();
            }

            if (key.equals("text")) {
                return node.text();
            }

            if (key.endsWith("[]")) {
                key = key.substring(0, key.length()-2);
                return node.getProperty(key);
View Full Code Here


                    GPathResult plugins = (GPathResult) root.getProperty("plugins");
                    GPathResult nodes = (GPathResult) plugins.getProperty("plugin");

                    for (int i = 0, count = nodes.size(); i < count; i++) {
                        GPathResult node = (GPathResult) nodes.getAt(i);
                        final String pluginName = node.text();
                        Class<?> clazz;
                        if (classLoader instanceof GroovyClassLoader) {
                            clazz = classLoader.loadClass(pluginName);
                        }
                        else {
View Full Code Here

                try {
                    input = resource.getInputStream();
                    final GPathResult result = slurper.parse(input);
                    GPathResult pluginClass = (GPathResult) result.getProperty("type");
                    if (pluginClass.size() == 1) {
                        final String pluginClassName = pluginClass.text();
                        if (StringUtils.hasText(pluginClassName)) {
                            loadCorePlugin(pluginClassName, resource, result);
                        }
                    } else {
                        final Iterator iterator = pluginClass.nodeIterator();
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.