Package abstrasy

Examples of abstrasy.Node$ParseBag


        return new Node(System.getProperty("os.arch"));
    }

    public Node external_java_runtime_name(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 1);
        return new Node(System.getProperty("java.runtime.name"));
    }
View Full Code Here


        return new Node(System.getProperty("java.runtime.name"));
    }

    public Node external_java_runtime_version(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 1);
        return new Node(System.getProperty("java.runtime.version"));
    }
View Full Code Here

        return new Node(System.getProperty("java.runtime.version"));
    }

    public Node external_free_memory(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 1);
        return new Node(Runtime.getRuntime().freeMemory());
    }
View Full Code Here

        return new Node(Runtime.getRuntime().freeMemory());
    }

    public Node external_available_memory(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 1);
        return new Node(Runtime.getRuntime().maxMemory());
    }
View Full Code Here

        System.gc();
        return null;
    }

    public Node external_available_cpu(Node startAt) throws Exception {
        return new Node(Runtime.getRuntime().availableProcessors());
    }
View Full Code Here

        try {
            cname = InetAddress.getLocalHost().getHostName();
        }
        catch (Exception e) {
        }
        return new Node(cname);
    }
View Full Code Here

    }

    public Node external_get_system_property(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 2);
        String id = startAt.getSubNode(1, Node.TYPE_STRING).getString();
        return new Node(System.getProperty(id));
    }
View Full Code Here

    }

    public Node external_is_system_property_defined(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 2);
        String id = startAt.getSubNode(1, Node.TYPE_STRING).getString();
        return new Node(System.getProperties().containsKey((Object) id) ? Node.TRUE: Node.FALSE);
    }
View Full Code Here

    public Node external_set_system_property(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 3);
        String id = startAt.getSubNode(1, Node.TYPE_STRING).getString();
        String value = startAt.getSubNode(2, Node.TYPE_STRING).getString();
        return new Node(System.setProperty(id, value));
    }
View Full Code Here

        return new Node(System.setProperty(id, value));
    }

    public Node external_system_properties(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        Node ynode = Node.createHash();
        Hash hash=ynode.getHash();
        Properties sprop = System.getProperties();
        Enumeration<?> eprop = sprop.propertyNames();
        while (eprop.hasMoreElements()) {
            String oid = (String) eprop.nextElement();
            hash.store(new Node(oid), new Node(sprop.getProperty(oid)));
        }
        return ynode;
    }
View Full Code Here

TOP

Related Classes of abstrasy.Node$ParseBag

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.