Package net.morimekta.providence.model
Class FunctionType._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<FunctionType>
-
- net.morimekta.providence.model.FunctionType._Builder
-
- All Implemented Interfaces:
Decl,Decl._Builder,FunctionType_OrBuilder,net.morimekta.providence.PMessageOrBuilder<FunctionType>,net.morimekta.providence.PValue<FunctionType>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- FunctionType
public static class FunctionType._Builder extends net.morimekta.providence.PMessageBuilder<FunctionType> implements Decl._Builder, FunctionType_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
(oneway)? <return_type> <name>'('<param>*')' (throws '(' <exception>+ ')')?
-
-
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.FunctionType builder instance._Builder(FunctionType base)Make a mutating builder off a base p_model.FunctionType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionType._BuilderaddTo(int key, java.lang.Object value)FunctionType._BuilderaddToExceptions(FieldType... values)Adds entries to theexceptionslist.FunctionType._BuilderaddToParams(FieldType... values)Adds entries to theparamslist.FunctionTypebuild()FunctionType._Builderclear(int key)FunctionType._BuilderclearAnnotations()Clear theannotationsfield.FunctionType._BuilderclearDocumentation()Clear thedocumentationfield.FunctionType._BuilderclearExceptions()Clear theexceptionsfield.FunctionType._BuilderclearName()Clear thenamefield.FunctionType._BuilderclearOneWay()Clear theone_wayfield.FunctionType._BuilderclearParams()Clear theparamsfield.FunctionType._BuilderclearReturnType()Clear thereturn_typefield.net.morimekta.providence.descriptor.PStructDescriptor<FunctionType>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.util.List<FieldType>getExceptions()java.lang.StringgetName()Name of the type, constant or service.java.util.List<FieldType>getParams()java.lang.StringgetReturnType()booleanhas(int key)booleanhasAnnotations()Checks for presence of theannotationsfield.booleanhasDocumentation()Checks for presence of thedocumentationfield.booleanhasExceptions()Checks for presence of theexceptionsfield.inthashCode()booleanhasName()Checks for presence of thenamefield.booleanhasOneWay()Checks for presence of theone_wayfield.booleanhasParams()Checks for presence of theparamsfield.booleanhasReturnType()Checks for presence of thereturn_typefield.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.booleanisModifiedExceptions()Checks if theexceptionsfield has been modified since the builder was created.booleanisModifiedName()Checks if thenamefield has been modified since the builder was created.booleanisModifiedOneWay()Checks if theone_wayfield has been modified since the builder was created.booleanisModifiedParams()Checks if theparamsfield has been modified since the builder was created.booleanisModifiedReturnType()Checks if thereturn_typefield has been modified since the builder was created.booleanisOneWay()booleanisSet(int key)booleanisSetAnnotations()Checks for explicit presence of theannotationsfield.booleanisSetDocumentation()Checks for explicit presence of thedocumentationfield.booleanisSetExceptions()Checks for explicit presence of theexceptionsfield.booleanisSetName()Checks for explicit presence of thenamefield.booleanisSetOneWay()Checks for explicit presence of theone_wayfield.booleanisSetParams()Checks for explicit presence of theparamsfield.booleanisSetReturnType()Checks for explicit presence of thereturn_typefield.FunctionType._Buildermerge(FunctionType from)java.util.Map<java.lang.String,java.lang.String>mutableAnnotations()java.util.List<FieldType>mutableExceptions()java.util.List<FieldType>mutableParams()net.morimekta.providence.PMessageBuildermutator(int key)intnumAnnotations()intnumExceptions()intnumParams()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.util.List<FieldType>>optionalExceptions()java.util.Optional<java.lang.Boolean>optionalOneWay()java.util.Optional<java.lang.String>optionalReturnType()FunctionType._BuilderputInAnnotations(java.lang.String key, java.lang.String value)Adds a mapping to theannotationsmap.voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)FunctionType._Builderset(int key, java.lang.Object value)FunctionType._BuildersetAnnotations(java.util.Map<java.lang.String,java.lang.String> value)Set theannotationsfield value.FunctionType._BuildersetDocumentation(java.lang.String value)Set thedocumentationfield value.FunctionType._BuildersetExceptions(java.util.Collection<FieldType> value)Set theexceptionsfield value.FunctionType._BuildersetName(java.lang.String value)Set thenamefield value.FunctionType._BuildersetOneWay(boolean value)Set theone_wayfield value.FunctionType._BuildersetOneWay(java.lang.Boolean value)Set theone_wayfield value.FunctionType._BuildersetParams(java.util.Collection<FieldType> value)Set theparamsfield value.FunctionType._BuildersetReturnType(java.lang.String value)Set thereturn_typefield value.booleanvalid()FunctionType._Buildervalidate()-
Methods inherited from class net.morimekta.providence.PMessageBuilder
addTo, clear, isModified, isSet, modifiedFieldNames, modifiedFields, mutator, presentFieldNames, presentFields, set
-
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a p_model.FunctionType builder instance.
-
_Builder
public _Builder(FunctionType base)
Make a mutating builder off a base p_model.FunctionType.- Parameters:
base- The base FunctionType
-
-
Method Detail
-
merge
@Nonnull public FunctionType._Builder merge(FunctionType from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
setDocumentation
@Nonnull public FunctionType._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 FunctionType._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
-
setOneWay
@Nonnull public FunctionType._Builder setOneWay(java.lang.Boolean value)
Set theone_wayfield value.- Parameters:
value- The new value- Returns:
- The builder
-
setOneWay
@Nonnull public FunctionType._Builder setOneWay(boolean value)
Set theone_wayfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetOneWay
public boolean isSetOneWay()
Checks for explicit presence of theone_wayfield.- Returns:
- True if one_way has been set.
-
hasOneWay
public boolean hasOneWay()
Checks for presence of theone_wayfield.- Specified by:
hasOneWayin interfaceFunctionType_OrBuilder- Returns:
- True if one_way is present.
-
isModifiedOneWay
public boolean isModifiedOneWay()
Checks if theone_wayfield has been modified since the builder was created.- Returns:
- True if one_way has been modified.
-
clearOneWay
@Nonnull public FunctionType._Builder clearOneWay()
Clear theone_wayfield.- Returns:
- The builder
-
isOneWay
public boolean isOneWay()
- Specified by:
isOneWayin interfaceFunctionType_OrBuilder- Returns:
- The
one_wayfield value
-
optionalOneWay
@Nonnull public java.util.Optional<java.lang.Boolean> optionalOneWay()
- Specified by:
optionalOneWayin interfaceFunctionType_OrBuilder- Returns:
- Optional
one_wayfield value
-
setReturnType
@Nonnull public FunctionType._Builder setReturnType(java.lang.String value)
Set thereturn_typefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetReturnType
public boolean isSetReturnType()
Checks for explicit presence of thereturn_typefield.- Returns:
- True if return_type has been set.
-
hasReturnType
public boolean hasReturnType()
Checks for presence of thereturn_typefield.- Specified by:
hasReturnTypein interfaceFunctionType_OrBuilder- Returns:
- True if return_type is present.
-
isModifiedReturnType
public boolean isModifiedReturnType()
Checks if thereturn_typefield has been modified since the builder was created.- Returns:
- True if return_type has been modified.
-
clearReturnType
@Nonnull public FunctionType._Builder clearReturnType()
Clear thereturn_typefield.- Returns:
- The builder
-
getReturnType
public java.lang.String getReturnType()
- Specified by:
getReturnTypein interfaceFunctionType_OrBuilder- Returns:
- The
return_typefield value
-
optionalReturnType
@Nonnull public java.util.Optional<java.lang.String> optionalReturnType()
- Specified by:
optionalReturnTypein interfaceFunctionType_OrBuilder- Returns:
- Optional
return_typefield value
-
setName
@Nonnull public FunctionType._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 FunctionType._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.
-
setParams
@Nonnull public FunctionType._Builder setParams(java.util.Collection<FieldType> value)
Set theparamsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
addToParams
@Nonnull public FunctionType._Builder addToParams(FieldType... values)
Adds entries to theparamslist.- Parameters:
values- The added value- Returns:
- The builder
-
isSetParams
public boolean isSetParams()
Checks for explicit presence of theparamsfield.- Returns:
- True if params has been set.
-
hasParams
public boolean hasParams()
Checks for presence of theparamsfield.- Specified by:
hasParamsin interfaceFunctionType_OrBuilder- Returns:
- True if params is present.
-
isModifiedParams
public boolean isModifiedParams()
Checks if theparamsfield has been modified since the builder was created.- Returns:
- True if params has been modified.
-
clearParams
@Nonnull public FunctionType._Builder clearParams()
Clear theparamsfield.- Returns:
- The builder
-
mutableParams
public java.util.List<FieldType> mutableParams()
- Returns:
- The mutable
paramscontainer
-
getParams
public java.util.List<FieldType> getParams()
- Specified by:
getParamsin interfaceFunctionType_OrBuilder- Returns:
- The
paramsfield value
-
numParams
public int numParams()
- Specified by:
numParamsin interfaceFunctionType_OrBuilder- Returns:
- Number of entries in
params.
-
setExceptions
@Nonnull public FunctionType._Builder setExceptions(java.util.Collection<FieldType> value)
Set theexceptionsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
addToExceptions
@Nonnull public FunctionType._Builder addToExceptions(FieldType... values)
Adds entries to theexceptionslist.- Parameters:
values- The added value- Returns:
- The builder
-
isSetExceptions
public boolean isSetExceptions()
Checks for explicit presence of theexceptionsfield.- Returns:
- True if exceptions has been set.
-
hasExceptions
public boolean hasExceptions()
Checks for presence of theexceptionsfield.- Specified by:
hasExceptionsin interfaceFunctionType_OrBuilder- Returns:
- True if exceptions is present.
-
isModifiedExceptions
public boolean isModifiedExceptions()
Checks if theexceptionsfield has been modified since the builder was created.- Returns:
- True if exceptions has been modified.
-
clearExceptions
@Nonnull public FunctionType._Builder clearExceptions()
Clear theexceptionsfield.- Returns:
- The builder
-
mutableExceptions
public java.util.List<FieldType> mutableExceptions()
- Returns:
- The mutable
exceptionscontainer
-
getExceptions
public java.util.List<FieldType> getExceptions()
- Specified by:
getExceptionsin interfaceFunctionType_OrBuilder- Returns:
- The
exceptionsfield value
-
optionalExceptions
@Nonnull public java.util.Optional<java.util.List<FieldType>> optionalExceptions()
- Specified by:
optionalExceptionsin interfaceFunctionType_OrBuilder- Returns:
- Optional
exceptionsfield value
-
numExceptions
public int numExceptions()
- Specified by:
numExceptionsin interfaceFunctionType_OrBuilder- Returns:
- Number of entries in
exceptions.
-
setAnnotations
@Nonnull public FunctionType._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 FunctionType._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 interfaceFunctionType_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 FunctionType._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 interfaceFunctionType_OrBuilder- Returns:
- The
annotationsfield value
-
optionalAnnotations
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalAnnotations()
- Specified by:
optionalAnnotationsin interfaceFunctionType_OrBuilder- Returns:
- Optional
annotationsfield value
-
numAnnotations
public int numAnnotations()
- Specified by:
numAnnotationsin interfaceFunctionType_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<FunctionType>
-
set
@Nonnull public FunctionType._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessageOrBuilder<FunctionType>
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessageOrBuilder<FunctionType>
-
addTo
@Nonnull public FunctionType._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
clear
@Nonnull public FunctionType._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
validate
public FunctionType._Builder validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<FunctionType>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<FunctionType> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PMessageOrBuilder<FunctionType>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<FunctionType>
-
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 FunctionType build()
- Specified by:
buildin interfaceDecl._Builder- Specified by:
buildin classnet.morimekta.providence.PMessageBuilder<FunctionType>- Returns:
- The built instance
-
-