List getBuiltInOptions()

in api_dev/src/main/java/com/google/appengine/tools/development/DevAppServerMain.java [74:194]


  List<Option> getBuiltInOptions() {
    List<Option> options = new ArrayList<>();
    options.addAll(getSharedOptions());
    options.addAll(
        Arrays.asList(
            new Option("a", "address", false) {
              @Override
              public void apply() {
                address = getValue();
              }

              @Override
              public List<String> getHelpLines() {
                return ImmutableList.of(
                    " --address=ADDRESS          The address of the interface on the local machine",
                    "  -a ADDRESS                  to bind to (or 0.0.0.0 for all interfaces).");
              }
            },
            new Option("p", "port", false) {
              @Override
              public void apply() {
                port = Integer.parseInt(getValue());
              }

              @Override
              public List<String> getHelpLines() {
                return ImmutableList.of(
                    " --port=PORT                The port number to bind to on the local machine.",
                    "  -p PORT");
              }
            },
            new Option(null, "disable_update_check", true) {
              @Override
              public void apply() {
                // no op
              }

              @Override
              public List<String> getHelpLines() {
                return ImmutableList.of(
                    " --disable_update_check     Disable the check for newer SDK versions.");
              }
            },
            new Option(null, "generated_dir", false) {
              @Override
              public void apply() {
                generatedDirectory = getValue();
              }

              @Override
              public List<String> getHelpLines() {
                return ImmutableList.of(
                    " --generated_dir=DIR        Set the directory where generated files are"
                        + " created.");
              }
            },
            // Because of the limited horizontal space in the help lines, I (rbarry) had to shorten
            // the
            // full name from default_gcs_bucket_name to just default_gcs_bucket.
            new Option(null, "default_gcs_bucket", false) {
              @Override
              public void apply() {
                defaultGcsBucketName = getValue();
              }

              @Override
              public ImmutableList<String> getHelpLines() {
                return ImmutableList.of(
                    " --default_gcs_bucket=NAME  Set the default Google Cloud Storage bucket"
                        + " name.");
              }
            },
            new Option("A", "application", false) {
              @Override
              public void apply() {
                applicationId = getValue();
              }

              @Override
              public List<String> getHelpLines() {
                return ImmutableList.of(
                    " --application=APP_ID       Set the application, overriding the application ",
                    "  -A APP_ID                   value from the application's "
                        + "configuration files.");
              }
            },
            new Option(null, "instance_port", false) {
              @Override
              public void apply() {
                processInstancePorts(getValues());
              }
              // --instance_port Module instance port specification. The module instance port
              //   specification may take one of two forms
              //
              //   Form one (--instance_port=module_name=port) is used to specify the port for an
              //   automatic module instance (one per automatic scaling module) or a load balancing
              //   instance (one per basic/manual scaling module).
              //
              //   Form two (--instance_port=module_name.instance=port) is used to specify the port
              //   for a non load balancing instance for a basic/manual scaling module. The number
              // of
              //   instances depends on the configuration and is not validated.
              //
              //   In either form module_name is not currently validated.
              //
              //   --instance_port is provided for internal testing and not currently documented
              // though
              //   perhaps users would find it useful.
            },
            new Option(null, "promote_yaml", true) {
              @Override
              public void apply() {
                System.setProperty("appengine.promoteYaml", "true");
              }
              // Deliberately undocumented.
              // This flag is only for internal use. When supplied, DevAppserver will try to use
              // yaml instead of xml configuration files. For example, queue.yaml instead of
              // queue.xml.
            }));
    return options;
  }