public final class Options extends Object
Modifier and Type | Field and Description |
---|---|
static ProtoType |
ENUM_OPTIONS |
static ProtoType |
ENUM_VALUE_OPTIONS |
static ProtoType |
FIELD_OPTIONS |
static ProtoType |
FILE_OPTIONS |
static ProtoType |
MESSAGE_OPTIONS |
static ProtoType |
METHOD_OPTIONS |
static ProtoType |
SERVICE_OPTIONS |
Constructor and Description |
---|
Options(ProtoType optionType,
List<OptionElement> elements) |
Modifier and Type | Method and Description |
---|---|
Object |
get(ProtoMember protoMember) |
Map<ProtoMember,Object> |
map()
Returns a map with the values for these options.
|
boolean |
optionMatches(String namePattern,
String valuePattern)
Returns true if any of the options in
options matches both of the regular expressions
provided: its name matches the option's name and its value matches the option's value. |
public static final ProtoType FILE_OPTIONS
public static final ProtoType MESSAGE_OPTIONS
public static final ProtoType FIELD_OPTIONS
public static final ProtoType ENUM_OPTIONS
public static final ProtoType ENUM_VALUE_OPTIONS
public static final ProtoType SERVICE_OPTIONS
public static final ProtoType METHOD_OPTIONS
public Options(ProtoType optionType, List<OptionElement> elements)
public Map<ProtoMember,Object> map()
{deprecated: "true"}
, or more sophisticated, with nested maps and lists.
The map keys are always ProtoMember
instances, even for nested maps. The values are
always either lists, maps, or strings.
public Object get(ProtoMember protoMember)
Copyright © 2013–2016 Square, Inc.. All rights reserved.