All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.akhikhl.gretty.JavaExecParams.groovy Maven / Gradle / Ivy

There is a newer version: 4.1.5
Show newest version
/*
 * Gretty
 *
 * Copyright (C) 2013-2015 Andrey Hihlovskiy and contributors.
 *
 * See the file "LICENSE" for copying and usage permission.
 * See the file "CONTRIBUTORS" for complete list of contributors.
 */
package org.akhikhl.gretty

import groovy.transform.ToString

/**
 *
 * @author akhikhl
 */
@ToString
class JavaExecParams {

  String main

  List jvmArgs = []

  List args = []

  boolean debug = false
  int debugPort = 5005
  boolean debugSuspend = true

  Map systemProperties = [:]

  void arg(String a) {
    args.add(a)
  }

  void args(String... a) {
    args.addAll(a)
  }

  void jvmArg(String a) {
    jvmArgs.add(a)
  }

  void jvmArgs(String... a) {
    jvmArgs.addAll(a)
  }

  void systemProperties(Map m) {
    if(systemProperties == null)
      systemProperties = [:]
    systemProperties << m
  }

  void systemProperty(String name, String value) {
    if(systemProperties == null)
      systemProperties = [:]
    systemProperties[name] = value
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy