Package net.morimekta.providence.model
Class Declaration
- java.lang.Object
-
- net.morimekta.providence.model.Declaration
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Declaration>,net.morimekta.providence.PMessage<Declaration,Declaration._Field>,net.morimekta.providence.PUnion<Declaration,Declaration._Field>,net.morimekta.providence.PValue<Declaration>,net.morimekta.providence.serializer.binary.BinaryWriter,net.morimekta.util.Stringable
@Generated("providence-maven-plugin") @Immutable public class Declaration extends java.lang.Object implements net.morimekta.providence.PUnion<Declaration,Declaration._Field>, java.lang.Comparable<Declaration>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter( <enum> | <typedef> | <struct> | <service> | <const> )- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeclaration._Builder( <enum> | <typedef> | <struct> | <service> | <const> )static classDeclaration._Field
-
Field Summary
Fields Modifier and Type Field Description static net.morimekta.providence.descriptor.PUnionDescriptor<Declaration,Declaration._Field>kDescriptor
-
Method Summary
-
-
-
Field Detail
-
kDescriptor
public static final net.morimekta.providence.descriptor.PUnionDescriptor<Declaration,Declaration._Field> kDescriptor
-
-
Method Detail
-
withDeclEnum
@Nonnull public static Declaration withDeclEnum(EnumType value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclEnum
@Nonnull public static Declaration withDeclEnum(EnumType._Builder value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclTypedef
@Nonnull public static Declaration withDeclTypedef(TypedefType value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclTypedef
@Nonnull public static Declaration withDeclTypedef(TypedefType._Builder value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclMessage
@Nonnull public static Declaration withDeclMessage(MessageType value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclMessage
@Nonnull public static Declaration withDeclMessage(MessageType._Builder value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclService
@Nonnull public static Declaration withDeclService(ServiceType value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclService
@Nonnull public static Declaration withDeclService(ServiceType._Builder value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclConst
@Nonnull public static Declaration withDeclConst(ConstType value)
- Parameters:
value- The union value- Returns:
- The created union.
-
withDeclConst
@Nonnull public static Declaration withDeclConst(ConstType._Builder value)
- Parameters:
value- The union value- Returns:
- The created union.
-
hasDeclEnum
public boolean hasDeclEnum()
-
getDeclEnum
public EnumType getDeclEnum()
- Returns:
- The
decl_enumvalue
-
optionalDeclEnum
@Nonnull public java.util.Optional<EnumType> optionalDeclEnum()
- Returns:
- Optional of the
decl_enumfield value.
-
hasDeclTypedef
public boolean hasDeclTypedef()
-
getDeclTypedef
public TypedefType getDeclTypedef()
- Returns:
- The
decl_typedefvalue
-
optionalDeclTypedef
@Nonnull public java.util.Optional<TypedefType> optionalDeclTypedef()
- Returns:
- Optional of the
decl_typedeffield value.
-
hasDeclMessage
public boolean hasDeclMessage()
-
getDeclMessage
public MessageType getDeclMessage()
- Returns:
- The
decl_messagevalue
-
optionalDeclMessage
@Nonnull public java.util.Optional<MessageType> optionalDeclMessage()
- Returns:
- Optional of the
decl_messagefield value.
-
hasDeclService
public boolean hasDeclService()
-
getDeclService
public ServiceType getDeclService()
- Returns:
- The
decl_servicevalue
-
optionalDeclService
@Nonnull public java.util.Optional<ServiceType> optionalDeclService()
- Returns:
- Optional of the
decl_servicefield value.
-
hasDeclConst
public boolean hasDeclConst()
-
getDeclConst
public ConstType getDeclConst()
- Returns:
- The
decl_constvalue
-
optionalDeclConst
@Nonnull public java.util.Optional<ConstType> optionalDeclConst()
- Returns:
- Optional of the
decl_constfield value.
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessage<Declaration,Declaration._Field>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessage<Declaration,Declaration._Field>
-
unionFieldIsSet
public boolean unionFieldIsSet()
- Specified by:
unionFieldIsSetin interfacenet.morimekta.providence.PUnion<Declaration,Declaration._Field>
-
unionField
@Nonnull public Declaration._Field unionField()
- Specified by:
unionFieldin interfacenet.morimekta.providence.PUnion<Declaration,Declaration._Field>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
asString
@Nonnull public java.lang.String asString()
- Specified by:
asStringin interfacenet.morimekta.providence.PMessage<Declaration,Declaration._Field>- Specified by:
asStringin interfacenet.morimekta.util.Stringable
-
compareTo
public int compareTo(Declaration other)
- Specified by:
compareToin interfacejava.lang.Comparable<Declaration>
-
writeBinary
public int writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer) throws java.io.IOException- Specified by:
writeBinaryin interfacenet.morimekta.providence.serializer.binary.BinaryWriter- Throws:
java.io.IOException
-
mutate
@Nonnull public Declaration._Builder mutate()
- Specified by:
mutatein interfacenet.morimekta.providence.PMessage<Declaration,Declaration._Field>
-
provider
@Nonnull public static net.morimekta.providence.descriptor.PUnionDescriptorProvider<Declaration,Declaration._Field> provider()
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PUnionDescriptor<Declaration,Declaration._Field> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PMessage<Declaration,Declaration._Field>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<Declaration>
-
builder
public static Declaration._Builder builder()
Make apmodel.Declarationbuilder.- Returns:
- The builder instance.
-
-