
com.sun.messaging.jmq.util.options.OptionDesc Maven / Gradle / Ivy
/*
* Copyright (c) 2000, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright 2021 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package com.sun.messaging.jmq.util.options;
/**
* This class describes a command line option:
*
*
* - it's type
*
- the actual option string
*
- it's base property
*
- it's value (if type is OptionType.OPTION_VALUE_HARDCODED)
*
*
* @see OptionType
*/
public class OptionDesc {
/**
* The type of the option, as defined by the interface OptionType. The valid values are:
*
* - OPTION_VALUE_HARDCODED
*
- OPTION_VALUE_NEXT_ARG
*
- OPTION_VALUE_NEXT_ARG_RES
*
*
* @see OptionType
*/
public int type;
/**
* The actual option, for example -a
*/
public String option;
/**
* The property name that will be associated with this option. This property name may be a basename for the actual
* property used.
*
* @see OptionType#OPTION_VALUE_NEXT_ARG_RES
*/
public String baseProperty;
public String nameValuePair = null;
/**
* Flag indicating whether this option should be parsed, but not processed (i.e. stored in properties database).
*/
public boolean ignore = false;
/**
* Value of the property for this option. See OptionType.OPTION_VALUE_HARDCODED.
*
* @see OptionType
*/
public String value;
public OptionDesc(String option, int type, String baseProp, String value) {
this(option, type, baseProp, value, null, false);
}
public OptionDesc(String option, int type, String baseProp, String value, String nameValuePair) {
this(option, type, baseProp, value, nameValuePair, false);
}
public OptionDesc(String option, int type, String baseProp, String value, boolean ignore) {
this(option, type, baseProp, value, null, ignore);
}
public OptionDesc(String option, int type, String baseProp, String value, String nameValuePair, boolean ignore) {
this.type = type;
this.option = option;
this.baseProperty = baseProp;
this.value = value;
this.nameValuePair = nameValuePair;
this.ignore = ignore;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy