Class FieldDeclaration
- java.lang.Object
-
- net.morimekta.providence.reflect.model.Declaration
-
- net.morimekta.providence.reflect.model.FieldDeclaration
-
public class FieldDeclaration extends Declaration
Represents the declaration of a single field param or thrown exception.field ::= ({id} ':')? {optionality}? {type} {name} ('=' {defaultValue}) {annotations}?
-
-
Constructor Summary
Constructors Constructor Description FieldDeclaration(java.lang.String documentation, ThriftToken id, int fieldId, ThriftToken requirement, ThriftToken name, java.util.List<ThriftToken> type, java.util.List<ThriftToken> defaultValue, java.util.List<AnnotationDeclaration> annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultValue()
java.util.List<ThriftToken>
getDefaultValueTokens()
int
getId()
ThriftToken
getIdToken()
net.morimekta.providence.descriptor.PRequirement
getRequirement()
ThriftToken
getRequirementToken()
java.lang.String
getType()
ThriftToken
getTypeToken()
java.util.List<ThriftToken>
getTypeTokens()
-
Methods inherited from class net.morimekta.providence.reflect.model.Declaration
getAnnotations, getDocumentation, getName, getNameToken
-
-
-
-
Constructor Detail
-
FieldDeclaration
public FieldDeclaration(@Nullable java.lang.String documentation, @Nullable ThriftToken id, int fieldId, @Nullable ThriftToken requirement, @Nonnull ThriftToken name, @Nonnull java.util.List<ThriftToken> type, @Nullable java.util.List<ThriftToken> defaultValue, @Nullable java.util.List<AnnotationDeclaration> annotations)
-
-
Method Detail
-
getId
public int getId()
-
getIdToken
public ThriftToken getIdToken()
-
getRequirement
@Nonnull public net.morimekta.providence.descriptor.PRequirement getRequirement()
-
getRequirementToken
@Nullable public ThriftToken getRequirementToken()
-
getDefaultValue
public java.lang.String getDefaultValue()
-
getDefaultValueTokens
@Nullable public java.util.List<ThriftToken> getDefaultValueTokens()
-
getType
@Nonnull public java.lang.String getType()
-
getTypeToken
@Nonnull public ThriftToken getTypeToken()
-
getTypeTokens
@Nonnull public java.util.List<ThriftToken> getTypeTokens()
-
-