Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/args/BooleanOption.java')
-rw-r--r--plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/args/BooleanOption.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/args/BooleanOption.java b/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/args/BooleanOption.java
new file mode 100644
index 000000000..65d98d23b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/args/BooleanOption.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+* Copyright (c) 2018 protos software gmbh (http://www.protos.de).
+* All rights reserved.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+*
+* CONTRIBUTORS:
+* Jan Belle (initial contribution)
+*
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.base.args;
+
+/**
+ * Describes an option that takes a {@link Boolean} value.
+ */
+public class BooleanOption extends Option<Boolean> {
+
+ public BooleanOption(String name, String parameterName, String description, boolean defaultValue) {
+ super(Boolean.class, name, parameterName, description, defaultValue);
+ }
+
+ @Override
+ public Boolean parseValue(String str) {
+ return Boolean.parseBoolean(str);
+ }
+}

Back to the top