1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.tradefed.config; 17 18 import com.android.tradefed.build.BuildSerializedVersion; 19 20 import java.io.Serializable; 21 22 /** Holds the details of an {@link Option}. */ 23 public final class OptionDef implements Serializable { 24 private static final long serialVersionUID = BuildSerializedVersion.VERSION; 25 26 public final String name; 27 public final String key; 28 public final String value; 29 public final String source; 30 public final String applicableObjectType; 31 OptionDef(String optionName, String optionValue, String source)32 public OptionDef(String optionName, String optionValue, String source) { 33 this(optionName, null, optionValue, source, null); 34 } 35 OptionDef(String optionName, String optionKey, String optionValue, String source)36 public OptionDef(String optionName, String optionKey, String optionValue, String source) { 37 this(optionName, optionKey, optionValue, source, null); 38 } 39 OptionDef( String optionName, String optionKey, String optionValue, String source, String type)40 public OptionDef( 41 String optionName, String optionKey, String optionValue, String source, String type) { 42 this.name = optionName; 43 this.key = optionKey; 44 this.value = optionValue; 45 this.source = source; 46 this.applicableObjectType = type; 47 } 48 } 49