Package net.morimekta.providence.model
Class ServiceType._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<ServiceType>
-
- net.morimekta.providence.model.ServiceType._Builder
-
- All Implemented Interfaces:
Decl,Decl._Builder,ServiceType_OrBuilder,net.morimekta.providence.PMessageOrBuilder<ServiceType>,net.morimekta.providence.PValue<ServiceType>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- ServiceType
public static class ServiceType._Builder extends net.morimekta.providence.PMessageBuilder<ServiceType> implements Decl._Builder, ServiceType_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
service (extends <extend>)? { (<method> [;,]?)* }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.morimekta.providence.model.Decl
Decl._Builder, Decl._Field
-
-
Field Summary
-
Fields inherited from interface net.morimekta.providence.model.Decl
kDescriptor
-
-
Constructor Summary
Constructors Constructor Description _Builder()Make a p_model.ServiceType builder instance._Builder(ServiceType base)Make a mutating builder off a base p_model.ServiceType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceType._BuilderaddTo(int key, java.lang.Object value)ServiceType._BuilderaddToMethods(FunctionType... values)Adds entries to themethodslist.ServiceTypebuild()ServiceType._Builderclear(int key)ServiceType._BuilderclearAnnotations()Clear theannotationsfield.ServiceType._BuilderclearDocumentation()Clear thedocumentationfield.ServiceType._BuilderclearExtend()Clear theextendfield.ServiceType._BuilderclearMethods()Clear themethodsfield.ServiceType._BuilderclearName()Clear thenamefield.net.morimekta.providence.descriptor.PStructDescriptor<ServiceType>descriptor()booleanequals(java.lang.Object o)<T> Tget(int key)java.util.Map<java.lang.String,java.lang.String>getAnnotations()java.lang.StringgetDocumentation()Documentation for the specific declaration.java.lang.StringgetExtend()java.util.List<FunctionType>getMethods()java.lang.StringgetName()Name of the type, constant or service.booleanhas(int key)booleanhasAnnotations()Checks for presence of theannotationsfield.booleanhasDocumentation()Checks for presence of thedocumentationfield.booleanhasExtend()Checks for presence of theextendfield.inthashCode()booleanhasMethods()Checks for presence of themethodsfield.booleanhasName()Checks for presence of thenamefield.booleanisModified(int key)booleanisModifiedAnnotations()Checks if theannotationsfield has been modified since the builder was created.booleanisModifiedDocumentation()Checks if thedocumentationfield has been modified since the builder was created.booleanisModifiedExtend()Checks if theextendfield has been modified since the builder was created.booleanisModifiedMethods()Checks if themethodsfield has been modified since the builder was created.booleanisModifiedName()Checks if thenamefield has been modified since the builder was created.booleanisSet(int key)booleanisSetAnnotations()Checks for explicit presence of theannotationsfield.booleanisSetDocumentation()Checks for explicit presence of thedocumentationfield.booleanisSetExtend()Checks for explicit presence of theextendfield.booleanisSetMethods()Checks for explicit presence of themethodsfield.booleanisSetName()Checks for explicit presence of thenamefield.ServiceType._Buildermerge(ServiceType from)java.util.Map<java.lang.String,java.lang.String>mutableAnnotations()java.util.List<FunctionType>mutableMethods()net.morimekta.providence.PMessageBuildermutator(int key)intnumAnnotations()intnumMethods()java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>optionalAnnotations()java.util.Optional<java.lang.String>optionalDocumentation()Documentation for the specific declaration.java.util.Optional<java.lang.String>optionalExtend()ServiceType._BuilderputInAnnotations(java.lang.String key, java.lang.String value)Adds a mapping to theannotationsmap.voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)ServiceType._Builderset(int key, java.lang.Object value)ServiceType._BuildersetAnnotations(java.util.Map<java.lang.String,java.lang.String> value)Set theannotationsfield value.ServiceType._BuildersetDocumentation(java.lang.String value)Set thedocumentationfield value.ServiceType._BuildersetExtend(java.lang.String value)Set theextendfield value.ServiceType._BuildersetMethods(java.util.Collection<FunctionType> value)Set themethodsfield value.ServiceType._BuildersetName(java.lang.String value)Set thenamefield value.booleanvalid()ServiceType._Buildervalidate()-
Methods inherited from class net.morimekta.providence.PMessageBuilder
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, set
-
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a p_model.ServiceType builder instance.
-
_Builder
public _Builder(ServiceType base)
Make a mutating builder off a base p_model.ServiceType.- Parameters:
base- The base ServiceType
-
-
Method Detail
-
merge
@Nonnull public ServiceType._Builder merge(ServiceType from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
setDocumentation
@Nonnull public ServiceType._Builder setDocumentation(java.lang.String value)
Set thedocumentationfield value.- Specified by:
setDocumentationin interfaceDecl._Builder- Parameters:
value- The new value- Returns:
- The builder
-
isSetDocumentation
public boolean isSetDocumentation()
Checks for explicit presence of thedocumentationfield.- Returns:
- True if documentation has been set.
-
hasDocumentation
public boolean hasDocumentation()
Checks for presence of thedocumentationfield.- Specified by:
hasDocumentationin interfaceDecl- Returns:
- True if documentation is present.
-
isModifiedDocumentation
public boolean isModifiedDocumentation()
Checks if thedocumentationfield has been modified since the builder was created.- Returns:
- True if documentation has been modified.
-
clearDocumentation
@Nonnull public ServiceType._Builder clearDocumentation()
Clear thedocumentationfield.- Specified by:
clearDocumentationin interfaceDecl._Builder- Returns:
- The builder
-
getDocumentation
public java.lang.String getDocumentation()
Description copied from interface:DeclDocumentation for the specific declaration.- Specified by:
getDocumentationin interfaceDecl- Returns:
- The
documentationfield value
-
optionalDocumentation
@Nonnull public java.util.Optional<java.lang.String> optionalDocumentation()
Description copied from interface:DeclDocumentation for the specific declaration.- Specified by:
optionalDocumentationin interfaceDecl- Returns:
- Optional
documentationfield value
-
setName
@Nonnull public ServiceType._Builder setName(java.lang.String value)
Set thenamefield value.- Specified by:
setNamein interfaceDecl._Builder- Parameters:
value- The new value- Returns:
- The builder
-
isSetName
public boolean isSetName()
Checks for explicit presence of thenamefield.- Returns:
- True if name has been set.
-
hasName
public boolean hasName()
Checks for presence of thenamefield.
-
isModifiedName
public boolean isModifiedName()
Checks if thenamefield has been modified since the builder was created.- Returns:
- True if name has been modified.
-
clearName
@Nonnull public ServiceType._Builder clearName()
Clear thenamefield.- Specified by:
clearNamein interfaceDecl._Builder- Returns:
- The builder
-
getName
public java.lang.String getName()
Description copied from interface:DeclName of the type, constant or service.
-
setExtend
@Nonnull public ServiceType._Builder setExtend(java.lang.String value)
Set theextendfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetExtend
public boolean isSetExtend()
Checks for explicit presence of theextendfield.- Returns:
- True if extend has been set.
-
hasExtend
public boolean hasExtend()
Checks for presence of theextendfield.- Specified by:
hasExtendin interfaceServiceType_OrBuilder- Returns:
- True if extend is present.
-
isModifiedExtend
public boolean isModifiedExtend()
Checks if theextendfield has been modified since the builder was created.- Returns:
- True if extend has been modified.
-
clearExtend
@Nonnull public ServiceType._Builder clearExtend()
Clear theextendfield.- Returns:
- The builder
-
getExtend
public java.lang.String getExtend()
- Specified by:
getExtendin interfaceServiceType_OrBuilder- Returns:
- The
extendfield value
-
optionalExtend
@Nonnull public java.util.Optional<java.lang.String> optionalExtend()
- Specified by:
optionalExtendin interfaceServiceType_OrBuilder- Returns:
- Optional
extendfield value
-
setMethods
@Nonnull public ServiceType._Builder setMethods(java.util.Collection<FunctionType> value)
Set themethodsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
addToMethods
@Nonnull public ServiceType._Builder addToMethods(FunctionType... values)
Adds entries to themethodslist.- Parameters:
values- The added value- Returns:
- The builder
-
isSetMethods
public boolean isSetMethods()
Checks for explicit presence of themethodsfield.- Returns:
- True if methods has been set.
-
hasMethods
public boolean hasMethods()
Checks for presence of themethodsfield.- Specified by:
hasMethodsin interfaceServiceType_OrBuilder- Returns:
- True if methods is present.
-
isModifiedMethods
public boolean isModifiedMethods()
Checks if themethodsfield has been modified since the builder was created.- Returns:
- True if methods has been modified.
-
clearMethods
@Nonnull public ServiceType._Builder clearMethods()
Clear themethodsfield.- Returns:
- The builder
-
mutableMethods
public java.util.List<FunctionType> mutableMethods()
- Returns:
- The mutable
methodscontainer
-
getMethods
public java.util.List<FunctionType> getMethods()
- Specified by:
getMethodsin interfaceServiceType_OrBuilder- Returns:
- The
methodsfield value
-
numMethods
public int numMethods()
- Specified by:
numMethodsin interfaceServiceType_OrBuilder- Returns:
- Number of entries in
methods.
-
setAnnotations
@Nonnull public ServiceType._Builder setAnnotations(java.util.Map<java.lang.String,java.lang.String> value)
Set theannotationsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
putInAnnotations
@Nonnull public ServiceType._Builder putInAnnotations(java.lang.String key, java.lang.String value)
Adds a mapping to theannotationsmap.- Parameters:
key- The inserted keyvalue- The inserted value- Returns:
- The builder
-
isSetAnnotations
public boolean isSetAnnotations()
Checks for explicit presence of theannotationsfield.- Returns:
- True if annotations has been set.
-
hasAnnotations
public boolean hasAnnotations()
Checks for presence of theannotationsfield.- Specified by:
hasAnnotationsin interfaceServiceType_OrBuilder- Returns:
- True if annotations is present.
-
isModifiedAnnotations
public boolean isModifiedAnnotations()
Checks if theannotationsfield has been modified since the builder was created.- Returns:
- True if annotations has been modified.
-
clearAnnotations
@Nonnull public ServiceType._Builder clearAnnotations()
Clear theannotationsfield.- Returns:
- The builder
-
mutableAnnotations
public java.util.Map<java.lang.String,java.lang.String> mutableAnnotations()
- Returns:
- The mutable
annotationscontainer
-
getAnnotations
public java.util.Map<java.lang.String,java.lang.String> getAnnotations()
- Specified by:
getAnnotationsin interfaceServiceType_OrBuilder- Returns:
- The
annotationsfield value
-
optionalAnnotations
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalAnnotations()
- Specified by:
optionalAnnotationsin interfaceServiceType_OrBuilder- Returns:
- Optional
annotationsfield value
-
numAnnotations
public int numAnnotations()
- Specified by:
numAnnotationsin interfaceServiceType_OrBuilder- Returns:
- Number of entries in
annotations.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
mutator
public net.morimekta.providence.PMessageBuilder mutator(int key)
- Specified by:
mutatorin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
set
@Nonnull public ServiceType._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessageOrBuilder<ServiceType>
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessageOrBuilder<ServiceType>
-
addTo
@Nonnull public ServiceType._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
clear
@Nonnull public ServiceType._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
validate
public ServiceType._Builder validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<ServiceType>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<ServiceType> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PMessageOrBuilder<ServiceType>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<ServiceType>
-
readBinary
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws java.io.IOException- Specified by:
readBinaryin interfacenet.morimekta.providence.serializer.binary.BinaryReader- Throws:
java.io.IOException
-
build
@Nonnull public ServiceType build()
- Specified by:
buildin interfaceDecl._Builder- Specified by:
buildin classnet.morimekta.providence.PMessageBuilder<ServiceType>- Returns:
- The built instance
-
-