Package com.elega9t.commons.shell

Source Code of com.elega9t.commons.shell.Environment

package com.elega9t.commons.shell;

import com.elega9t.commons.util.StringUtilities;
import com.elega9t.commons.util.ReplacementProvider;
import com.elega9t.commons.shell.intrprtr.Context;

public class Environment extends Context<String> {

    public String resolve(String str) {
        return StringUtilities.replace("\\$([a-zA-Z0-9._\\-\\?]+)", str, new ReplacementProvider() {
            @Override
            public String getReplacement(String match) {
                return getValue(match);
            }
        });
    }

}
TOP

Related Classes of com.elega9t.commons.shell.Environment

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.