com.nitorcreations.willow.utils.MergeableProperties Maven / Gradle / Ivy
The newest version!
package com.nitorcreations.willow.utils;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import org.apache.commons.lang3.text.StrSubstitutor;
import com.nitorcreations.willow.protocols.Register;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public class MergeableProperties extends Properties implements Cloneable {
public static final Pattern ARRAY_PROPERTY_REGEX = Pattern.compile("(.*?)\\[(last|\\d*?)\\](\\}?)$");
public static final Pattern ARRAY_REFERENCE_REGEX = Pattern.compile("(\\$\\{)?(.*?)\\[(last|\\d+?)\\](.*?)$");
public static final Pattern SCRIPT_REGEX = Pattern.compile("(.*?)(\\