Package io.protostuff.parser
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 class
static class
static class
static class
static class
static class
static class
static class
static enum
(package private) static class
static class
static class
static class
static class
static class
static class
static class
static 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 io.protostuff.parser.AnnotationContainer
annotations, docs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
abstract String
getName()
int
getO()
<V> V
Returns the option defined by thekey
.Returns this optionsgetOwner()
getProto()
Returns field type for proto files.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
putExtraOption
(String key, Object value) void
putStandardOption
(String key, Object value) toString()
Methods inherited from class io.protostuff.parser.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:
getOptions
in interfaceHasOptions
-
getOption
Returns the option defined by thekey
. -
hasOption
-
putStandardOption
- Specified by:
putStandardOption
in interfaceHasOptions
-
putExtraOption
- Specified by:
putExtraOption
in 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:
compareTo
in 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
-