Class FieldDescriptor
java.lang.Object
org.infinispan.protostream.impl.AnnotatedDescriptorImpl
org.infinispan.protostream.descriptors.FieldDescriptor
- All Implemented Interfaces:
AnnotatedDescriptor
- Direct Known Subclasses:
MapDescriptor,RepeatedFieldDescriptor
Represents a field in a proto file.
- Since:
- 2.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Descriptorprotected final Stringprotected EnumDescriptorprotected FileDescriptorprotected final Labelprotected Descriptorprotected final intprotected Typeprotected final StringFields inherited from class org.infinispan.protostream.impl.AnnotatedDescriptorImpl
annotations, documentation, fullName, name, processedAnnotations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AnnotationConfigurationgetAnnotationConfig(AnnotationElement.Annotation annotation) Subclasses are responsible for fetching theAnnotationConfigurationfrom the appropriate config (it it exists) and to validate that the target is suitable.Return the containing files's descriptorgetLabel()intgetOptionByName(String name) getType()intbooleanbooleanisMap()boolean(package private) voidsetContainingMessage(Descriptor containingMessage) (package private) voidsetEnumType(EnumDescriptor enumDescriptor) (package private) voidsetFileDescriptor(FileDescriptor fileDescriptor) (package private) voidsetMessageType(Descriptor descriptor) toString()Methods inherited from class org.infinispan.protostream.impl.AnnotatedDescriptorImpl
getAnnotations, getAnnotationsConfig, getDocumentation, getFullName, getName, getProcessedAnnotationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.protostream.descriptors.AnnotatedDescriptor
getAnnotations, getDocumentation, getFullName, getName, getProcessedAnnotation
-
Field Details
-
number
protected final int number -
label
-
typeName
-
defaultValue
-
options
-
type
-
fileDescriptor
-
containingMessage
-
messageType
-
enumType
-
-
Constructor Details
-
FieldDescriptor
-
-
Method Details
-
getNumber
public int getNumber() -
getWireTag
public int getWireTag() -
getType
-
getMessageType
-
getLabel
-
getOptionByName
-
getOptions
-
isRepeated
public boolean isRepeated() -
isMap
public boolean isMap() -
getJavaType
-
getEnumType
-
getTypeName
-
getFileDescriptor
Description copied from interface:AnnotatedDescriptorReturn the containing files's descriptor- Specified by:
getFileDescriptorin interfaceAnnotatedDescriptor- Returns:
- the containing files's descriptor (never
null)
-
getContainingMessage
-
setContainingMessage
-
setMessageType
-
setEnumType
-
setFileDescriptor
-
getAnnotationConfig
Description copied from class:AnnotatedDescriptorImplSubclasses are responsible for fetching theAnnotationConfigurationfrom the appropriate config (it it exists) and to validate that the target is suitable.- Specified by:
getAnnotationConfigin classAnnotatedDescriptorImpl- Returns:
- null if the annotation is not found
-
toString
-
hasDefaultValue
public boolean hasDefaultValue() -
getDefaultValue
-