Class Field<T>
java.lang.Object
io.protostuff.parser.AnnotationContainer
io.protostuff.parser.Field<T>
- All Implemented Interfaces:
HasAnnotations, HasName, HasOptions, HasProto, Comparable<Field<?>>
- Direct Known Subclasses:
EnumField, Field.Bool, Field.Bytes, Field.Number, Field.Reference, Field.String, MessageField
public abstract class Field<T>
extends AnnotationContainer
implements Comparable<Field<?>>, HasName, HasOptions
Base class for fields defined in a
Message.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic enum(package private) static classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) T(package private) String(package private) final LinkedHashMap<String, Object> (package private) Field.Modifier(package private) String(package private) int(package private) Message(package private) boolean(package private) final LinkedHashMap<String, Object> Fields inherited from class AnnotationContainer
annotations, docs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintabstract StringgetName()intgetO()<V> VReturns the option defined by thekey.Returns this optionsgetOwner()getProto()Returns field type for proto files.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidputExtraOption(String key, Object value) voidputStandardOption(String key, Object value) toString()Methods inherited from class AnnotationContainer
add, addAnnotations, addDoc, err, getA, getAnnotation, getAnnotationMap, getAnnotations, getDocs, hasAnnotation, isEmptyA
-
Field Details
-
name
String name -
defaultValueConstant
String defaultValueConstant -
number
int number -
modifier
Field.Modifier modifier -
packable
boolean packable -
defaultValue
T defaultValue -
owner
Message owner -
standardOptions
-
extraOptions
-
-
Constructor Details
-
Field
public Field() -
Field
public Field(boolean packable)
-
-
Method Details
-
getProto
-
getStandardOptions
-
getExtraOptions
-
getO
-
getOptions
Returns this options- Specified by:
getOptionsin interfaceHasOptions
-
getOption
Returns the option defined by thekey. -
hasOption
-
putStandardOption
- Specified by:
putStandardOptionin interfaceHasOptions
-
putExtraOption
- Specified by:
putExtraOptionin interfaceHasOptions
-
getName
-
getDefaultValueConstant
-
getNumber
public int getNumber()- Returns:
- the number
-
getModifier
- Returns:
- the modifier
-
isPackable
public boolean isPackable()- Returns:
- the packable
-
getDefaultValue
- Returns:
- the defaultValue
-
isRepeated
public boolean isRepeated() -
isRequired
public boolean isRequired() -
isOptional
public boolean isOptional() -
isDefaultValueSet
public boolean isDefaultValueSet() -
isNumberField
public boolean isNumberField() -
isEnumField
public boolean isEnumField() -
isMessageField
public boolean isMessageField() -
isBytesField
public boolean isBytesField() -
isStringField
public boolean isStringField() -
isBoolField
public boolean isBoolField() -
isDelimited
public boolean isDelimited() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
getJavaType
-
getProtoType
Returns field type for proto files. Scalar value types: https://developers.google.com/protocol-buffers/docs/proto#scalar- Returns:
- .proto type
-
getDefaultValueAsString
-
getOwner
-