Get a Jvm property / environment variable
@param prop the property to get
@return the property value
1180
public static String getJvmProperty(String prop) {
        return (System.getProperty(prop, System.getenv(prop)));
    }
142540
public static String getEnvVariable( String name )
        throws EnvironmentException
    {
        if( isUnix() )
        {
            Properties properties = getUnixShellVariables();
            return properties.getProperty( name );
        }
        else if( isWindows() )
        {
            Properties properties = getWindowsShellVariables();
            return properties.getProperty( name );
        }

        String osName = System.getProperty( "os.name" );
        throw new EnvironmentException( name, "Non-supported operating system: " + osName );
    }
1097289
public static String getEnvDefault(String propName, String defaultVal) {
        String ans = defaultVal;
        String value = System.getenv(propName);
        if (value != null) {
            ans = value.trim();
        } else if (defaultVal != null) {
            ans = defaultVal.trim();
        }
        return ans;
    }
1271472
public static Environment getEnvironment(Map<String,Object> properties)
    {
        if (gEnv == null)	// TODO(don) Possible concurrency issue
            gEnv = new Environment(properties); // Create the Environment (using defalt database(s))
        //+else
        //+	Utility.getLogger().warning("getEnvironmentCalled");
        return gEnv;
    }
1194467
Object getPropertyValue(final String propName, final Interpreter interp)
            throws UtilEvalError {
        String accessorName = Reflect.accessorName(Reflect.GET_PREFIX, propName);
        final Class<?>[] classArray = Reflect.ZERO_TYPES;
        BshMethod m = this.getMethod(accessorName, classArray);
        try {
            if (m != null)
                return m.invoke((Object[]) null, interp);
            accessorName = Reflect.accessorName(Reflect.IS_PREFIX, propName);
            m = this.getMethod(accessorName, classArray);
            if (m != null && m.getReturnType() == Boolean.TYPE)
                return m.invoke((Object[]) null, interp);
            return Primitive.VOID;
        } catch (final EvalError ee) {
            throw new UtilEvalError("'This' property accessor threw exception: "
                    + ee.getMessage(), ee);
        }
    }
205573
public static String getEnvironmentString(String name, String defaultValue) {
        if (envVars == null) {
            throw new IllegalStateException("The environment vars must be provided before calling getEnvironmentString.");
        }

        return envVars.get(ENV_PREFIX + name) != null ? envVars.get(ENV_PREFIX + name) : defaultValue;
    }
1018140
public static String getLocalProperty(final String key) {
        String ret = localProps.getProperty(key);
        if (StringUtils.isBlank(ret)) {
            return ret;
        }

        ret = replaceEnvVars(ret);

        return ret;
    }
976686
public ScriptEnvironment getEnvironment(String environmentName) {
      Preconditions.checkArgument(StringUtils.isNotNullOrBlank(environmentName),
                                  "Environment name cannot be null or empty"
                                 );
      ScriptEngine engine = engineManager.getEngineByName(environmentName);
      Preconditions.checkArgument(engine != null, environmentName + " is an unknown.");
      environmentName = engine.getFactory().getEngineName();
      if (!environments.containsKey(environmentName)) {
         environments.put(environmentName, new ScriptEnvironment(engine));
      }
      return environments.get(environmentName);
   }
597842
public static String getProperty(String key, String defaultValue) {
        String env = System.getenv(key);
        if (env != null && !"".equals(env)) {
            return env;
        }
        return System.getProperty(key, defaultValue);
    }
1238545
def get_prop(self, prop):
        

        if self._parser is None:
            raise ConfigurationError('Cannot call ParserProperty."get_prop" with no parser configured')

        return self._parser(prop) if prop else self._parser()
1182851
private File getFileFromProperty(final String name, final Properties props) {
        return getFileFromPath(props.getProperty(name));
    }
479305
public <F> F val(String propName) {
		Triple<String, Field, Reflecter<Object>> triple = getNestRefInfo(propName);
		return triple.getR().getPropVal(triple.getC(), triple.getL());
	}
880151
public static Object getProperty(Object o, String prop) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
	Field f = getFieldIgnoreCase(o.getClass(), prop);
	return f.get(o);
    }
462511
def get_property(self, prop):
        
        prop = prop.split('.')
        root = self
        for p in prop:
            if p in root:
                root = root[p]
            else:
                return None
        return root
1172616
public static <T> T getProperty(Object obj, String propName) {
        return getFieldValue(obj, propName);
    }
536021
@Override
    public Object get(String propName) {
        if (propName.equals("mode")) {
            return getMode();
        }
        return super.get(propName);
    }
224262
public java.lang.String getEnvVariablesOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetEnvVariables().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }