@VisibleForTesting
List<Option> getBuiltInOptions() {
List<Option> options = new ArrayList<>();
options.addAll(getSharedOptions());
options.addAll(Arrays.asList(
new Option("s", "server", false) {
@Override
public void apply() {
versionCheckServer = getValue();
}
@Override
public List<String> getHelpLines() {
return ImmutableList.of(
" --server=SERVER The server to use to determine the latest",
" -s SERVER SDK version.");
}
},
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.valueOf(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() {
disableUpdateCheck = true;
}
@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.");
}
},
new Option(null, "default_gcs_bucket", false) {
@Override
public void apply() {
defaultGcsBucketName = getValue();
}
@Override
public List<String> getHelpLines() {
return ImmutableList.of(
" --default_gcs_bucket=NAME Set the default Google Cloud Storage bucket name.");
}
},
new Option(null, "instance_port", false) {
@Override
public void apply() {
processInstancePorts(getValues());
}
}