Guava StandardSystemProperty - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava StandardSystemProperty class.

This code example shows how to use the following methods:value
      configuration = configurationClass.newInstance();
    } catch (ReflectiveOperationException ex) {
      throw new ConfigurationException("Could not instantiate configuration class " + configurationClass.getName(), ex);
    LaunchConfigData launchConfigData = LaunchConfigsInternal.createFromGlobalProperties(
      StandardSystemProperty.USER_DIR.value(), configurationSource.getClassLoader(), configurationSource.getOverrideProperties(), configurationSource.getDefaultProperties(), Registries.empty()
    LaunchConfigFactory launchConfigFactory = configuration.getLaunchConfigFactory();
    if (launchConfigFactory instanceof DefaultLaunchConfigFactory) {
      populateLaunchConfigFactory(launchConfigData, (DefaultLaunchConfigFactory) launchConfigFactory);
    return configuration;
  private void populateLaunchConfigFactory(LaunchConfigData data, DefaultLaunchConfigFactory launchConfigFactory) {
    Properties properties = data.getProperties();
    Map<String, String> envVars = data.getEnvVars();
    TypeCoercingProperties props = data.getTypeCoercingProperties();
    Class<HandlerFactory> handlerFactoryClass;
    try { 
This code example shows how to use the following methods:value
 * Builds a {@link ratpack.launch.LaunchConfig} by using the configuration system. 
public class ConfigurationLaunchConfigBuilder { 
  private String workingDir = StandardSystemProperty.USER_DIR.value();
  private ConfigurationSource configurationSource;
  private ClassLoader classLoader = Application.class.getClassLoader();
  private ByteSource byteSource;
  private Properties overrideProperties = System.getProperties();
  private Properties defaultProperties = new Properties();
  private Class<? extends Configuration> configurationClass;
   * Sets the working dir. 
   * @param workingDir the working dir 
   * @return this 
  public ConfigurationLaunchConfigBuilder workingDir(String workingDir) {
This code example shows how to use the following methods:value
        return new FileLineDifferenceIterator(lineItr(marked), lineItr(all));
    private static LineIterator lineItr(String seq) {
        Iterable<String> seqItr = Splitter.on(',').trimResults().split(seq);
        String lines = Joiner.on(StandardSystemProperty.LINE_SEPARATOR.value()).join(seqItr);
        return new LineIterator(new StringReader(lines));
This code example shows how to use the following methods:value
 * TODO - this should eventually be generated automatically 
public class NatlabPreferences { 
  //*** the keys and defaults for the options ******************************** 
  private static final String PATH_SEPARATOR = StandardSystemProperty.PATH_SEPARATOR.value();
  private static final String MATLAB_PATH_KEY = "matlab_path";
  private static final String MATLAB_PATH_DEFAULT = "";
  private static final String NATLAB_PATH_KEY = "natlab_path";
  private static final String NATLAB_PATH_DEFAULT = "";
  private static Preferences prefs = Preferences.userNodeForPackage(NatlabPreferences.class);
   * returns all preferences 
   * @return a map whose keys are preference keys, and whose values are the associated values 
  public static Map<String, Object> getAllPreferences() {
    return ImmutableMap.<String, Object>of(
        MATLAB_PATH_KEY, getMatlabPath(),
This code example shows how to use the following methods:value
    @Test(expectedExceptions = IOException.class, expectedExceptionsMessageRegExp = "Configured staging path is not a directory: .*") 
    public void testCreateWithStagingDirectoryFile() 
            throws Exception 
        java.nio.file.Path tmpdir = Paths.get(StandardSystemProperty.JAVA_IO_TMPDIR.value()); 
        java.nio.file.Path staging = Files.createTempFile(tmpdir, "staging", null); 
        // staging = /tmp/stagingXXX.tmp 
        try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) { 
            MockAmazonS3 s3 = new MockAmazonS3(); 
            Configuration conf = new Configuration(); 
            conf.set(PrestoS3FileSystem.S3_STAGING_DIRECTORY, staging.toString()); 
            fs.initialize(new URI("s3n://test-bucket/"), conf); 
            fs.create(new Path("s3n://test-bucket/test")); 
        finally { 
This code example shows how to use the following methods:value
    private Duration s3MaxBackoffTime = new Duration(10, TimeUnit.MINUTES);
    private Duration s3MaxRetryTime = new Duration(10, TimeUnit.MINUTES);
    private Duration s3ConnectTimeout = new Duration(5, TimeUnit.SECONDS);
    private Duration s3SocketTimeout = new Duration(5, TimeUnit.SECONDS);
    private int s3MaxConnections = 500;
    private File s3StagingDirectory = new File(StandardSystemProperty.JAVA_IO_TMPDIR.value());
    private DataSize s3MultipartMinFileSize = new DataSize(16, MEGABYTE);
    private DataSize s3MultipartMinPartSize = new DataSize(5, MEGABYTE);
    private boolean useParquetColumnNames;
    private boolean pinS3ClientToCurrentRegion;
    private String s3UserAgentPrefix = "";
    private HiveStorageFormat hiveStorageFormat = HiveStorageFormat.RCBINARY;
    private HiveCompressionCodec hiveCompressionCodec = HiveCompressionCodec.GZIP;
    private boolean respectTableFormat = true;
    private boolean immutablePartitions;
    private int maxPartitionsPerWriter = 100;
    private List<String> resourceConfigFiles;
See Code Examples for Guava StandardSystemProperty Methods: