Package net.morimekta.providence.model
Class ProgramType
- java.lang.Object
-
- net.morimekta.providence.model.ProgramType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ProgramType>,net.morimekta.providence.PMessage<ProgramType,ProgramType._Field>,net.morimekta.providence.PValue<ProgramType>,net.morimekta.providence.serializer.binary.BinaryWriter,net.morimekta.util.Stringable
@Generated("providence-maven-plugin") @Immutable public class ProgramType extends java.lang.Object implements net.morimekta.providence.PMessage<ProgramType,ProgramType._Field>, java.lang.Comparable<ProgramType>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter<namespace>* <include>* <declataion>*- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProgramType._Builder<namespace>* <include>* <declataion>*static classProgramType._Field
-
Field Summary
Fields Modifier and Type Field Description static net.morimekta.providence.descriptor.PStructDescriptor<ProgramType,ProgramType._Field>kDescriptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString()static ProgramType._Builderbuilder()Make apmodel.ProgramTypebuilder.intcompareTo(ProgramType other)net.morimekta.providence.descriptor.PStructDescriptor<ProgramType,ProgramType._Field>descriptor()booleanequals(java.lang.Object o)<T> Tget(int key)java.util.List<Declaration>getDecl()List of declarations in the program file.java.lang.StringgetDocumentation()Program documentation must come before the first statement of the header.java.util.List<java.lang.String>getIncludes()List of included thrift files.java.util.Map<java.lang.String,java.lang.String>getNamespaces()Map of language to laguage dependent namespace identifier.java.lang.StringgetProgramName()The program name, deducted from the .thrift IDL file name.booleanhas(int key)booleanhasDecl()booleanhasDocumentation()inthashCode()booleanhasIncludes()booleanhasNamespaces()booleanhasProgramName()ProgramType._Buildermutate()intnumDecl()intnumIncludes()intnumNamespaces()java.util.Optional<java.util.List<Declaration>>optionalDecl()List of declarations in the program file.java.util.Optional<java.lang.String>optionalDocumentation()Program documentation must come before the first statement of the header.java.util.Optional<java.util.List<java.lang.String>>optionalIncludes()List of included thrift files.java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>optionalNamespaces()Map of language to laguage dependent namespace identifier.static net.morimekta.providence.descriptor.PStructDescriptorProvider<ProgramType,ProgramType._Field>provider()java.lang.StringtoString()intwriteBinary(net.morimekta.util.io.BigEndianBinaryWriter writer)
-
-
-
Field Detail
-
kDescriptor
public static final net.morimekta.providence.descriptor.PStructDescriptor<ProgramType,ProgramType._Field> kDescriptor
-
-
Method Detail
-
hasDocumentation
public boolean hasDocumentation()
-
getDocumentation
public java.lang.String getDocumentation()
Program documentation must come before the first statement of the header.- Returns:
- The
documentationvalue
-
optionalDocumentation
@Nonnull public java.util.Optional<java.lang.String> optionalDocumentation()
Program documentation must come before the first statement of the header.- Returns:
- Optional of the
documentationfield value.
-
hasProgramName
public boolean hasProgramName()
-
getProgramName
@Nonnull public java.lang.String getProgramName()
The program name, deducted from the .thrift IDL file name.- Returns:
- The
program_namevalue
-
numIncludes
public int numIncludes()
-
hasIncludes
public boolean hasIncludes()
-
getIncludes
public java.util.List<java.lang.String> getIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Returns:
- The
includesvalue
-
optionalIncludes
@Nonnull public java.util.Optional<java.util.List<java.lang.String>> optionalIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Returns:
- Optional of the
includesfield value.
-
numNamespaces
public int numNamespaces()
-
hasNamespaces
public boolean hasNamespaces()
-
getNamespaces
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Returns:
- The
namespacesvalue
-
optionalNamespaces
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Returns:
- Optional of the
namespacesfield value.
-
numDecl
public int numDecl()
-
hasDecl
public boolean hasDecl()
-
getDecl
public java.util.List<Declaration> getDecl()
List of declarations in the program file. Same order as in the thrift file.- Returns:
- The
declvalue
-
optionalDecl
@Nonnull public java.util.Optional<java.util.List<Declaration>> optionalDecl()
List of declarations in the program file. Same order as in the thrift file.- Returns:
- Optional of the
declfield value.
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessage<ProgramType,ProgramType._Field>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessage<ProgramType,ProgramType._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<ProgramType,ProgramType._Field>- Specified by:
asStringin interfacenet.morimekta.util.Stringable
-
compareTo
public int compareTo(ProgramType other)
- Specified by:
compareToin interfacejava.lang.Comparable<ProgramType>
-
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 ProgramType._Builder mutate()
- Specified by:
mutatein interfacenet.morimekta.providence.PMessage<ProgramType,ProgramType._Field>
-
provider
@Nonnull public static net.morimekta.providence.descriptor.PStructDescriptorProvider<ProgramType,ProgramType._Field> provider()
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<ProgramType,ProgramType._Field> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PMessage<ProgramType,ProgramType._Field>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<ProgramType>
-
builder
public static ProgramType._Builder builder()
Make apmodel.ProgramTypebuilder.- Returns:
- The builder instance.
-
-