Package net.visualillusionsent.utils

Examples of net.visualillusionsent.utils.PropertiesFile.containsKey()


        try {
            File file = new File("plugins/" + filename);
            String jarName = filename.substring(0, filename.lastIndexOf("."));
            inf = new PropertiesFile(file.getAbsolutePath(), "Canary.inf");

            if (!inf.containsKey("main-class")) {
                Canary.logSevere("Failed to read main-class for '" + file.getName() + "' in Canary.inf Please specify a main-class entry in Canary.inf");
                return null;
            }
            inf.setString("jarName", jarName);
            inf.setString("jarPath", "plugins/".concat(filename));
View Full Code Here


                Canary.logSevere("Failed to read main-class for '" + file.getName() + "' in Canary.inf Please specify a main-class entry in Canary.inf");
                return null;
            }
            inf.setString("jarName", jarName);
            inf.setString("jarPath", "plugins/".concat(filename));
            if (!inf.containsKey("name")) {
                inf.setString("name", simpleMain(inf.getString("main-class")));
            }

            if (!pluginPriorities.containsKey(inf.getString("name"))) {
                pluginPriorities.setInt(inf.getString("name"), priorityBase * 10);
 
View Full Code Here

            if (!jar.isFile() || !jar.getName().endsWith(".jar")) {
                continue;
            }
            try {
                PropertiesFile inf = new PropertiesFile(jar.getAbsolutePath(), "Canary.inf");
                if (!inf.containsKey("name")) {
                    if (!simpleMain(inf.getString("main-class")).equals(name)) {
                        continue;
                    }
                    inf.setString("name", simpleMain(inf.getString("main-class")));
                }
View Full Code Here

                    continue;
                }
                inf.setString("jarPath", "plugins/".concat(jar.getName()));
                inf.setString("jarName", jar.getName().replace(".jar", ""));

                if (inf.containsKey("dependencies")) {
                    for (String dep : inf.getStringArray("dependencies", ";")) {
                        if (!plugins.containsKey(dep)) {
                            // Unsatisfied dependency
                            return null;
                        }
View Full Code Here

        while (itr.hasNext()) {
            String jar = itr.next();
            DependencyNode node = nodes.get(jar);
            PropertiesFile inf = node.getInf();

            if (inf.containsKey("dependencies")) {
                String[] dependencies = inf.getStringArray("dependencies", "[,;]+");
                for (String dependency : dependencies) {
                    dependency = dependency.trim();
                    // Remove empty entries
                    if (dependency.length() == 0) {
View Full Code Here

                        node.edges.add(nodes.get(dependency));
                    }
                }
            }

            if (inf.containsKey("optional-dependencies")) {
                String[] softDependencies = inf.getStringArray("optional-dependencies", "[,;]+");
                for (String dependency : softDependencies) {
                    dependency = dependency.trim();
                    // Remove empty entries
                    if (dependency.length() == 0) {
View Full Code Here

                return false;
            }

            PropertiesFile inf = new PropertiesFile(file.getAbsolutePath(), "Canary.inf");
            // Get the main class, or use the plugin name as class
            if (!inf.containsKey("main-class")) {
                Canary.logSevere("Failed to read main-class for '" + file.getName() + "' in Canary.inf Please specify a main-class entry in Canary.inf");
                return false;
            }

            if (!inf.containsKey("name")) {
View Full Code Here

            if (!inf.containsKey("main-class")) {
                Canary.logSevere("Failed to read main-class for '" + file.getName() + "' in Canary.inf Please specify a main-class entry in Canary.inf");
                return false;
            }

            if (!inf.containsKey("name")) {
                inf.setString("name", simpleMain(inf.getString("main-class")));
            }
            inf.setString("jarPath", "plugins/".concat(file.getName()));
            inf.setString("jarName", file.getName().replace(".jar", ""));
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.