Package com.elega9t.commons.shell.intrprtr.cmd

Source Code of com.elega9t.commons.shell.intrprtr.cmd.SetCommand

package com.elega9t.commons.shell.intrprtr.cmd;

import com.elega9t.commons.shell.Environment;
import com.elega9t.commons.shell.Shell;
import com.elega9t.commons.shell.intrprtr.Command;

public class SetCommand extends Command {

    public SetCommand() {
        super("set");
    }

    @Override
    public int execute(Shell shell) {
        Environment environment = shell.getEnvironment();
        for (String propertyName: environment.getPropertyNames()) {
            shell.outln(propertyName + "=" + environment.getValue(propertyName));
        }
        return 0;
    }

}
TOP

Related Classes of com.elega9t.commons.shell.intrprtr.cmd.SetCommand

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.