Class EnumDescriptor
java.lang.Object
org.infinispan.protostream.impl.AnnotatedDescriptorImpl
org.infinispan.protostream.descriptors.ReservableDescriptor
org.infinispan.protostream.descriptors.EnumDescriptor
- All Implemented Interfaces:
AnnotatedDescriptor, GenericDescriptor
Represents an enum in a proto file.
- Since:
- 2.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Descriptorprivate FileDescriptorprivate Integerprivate final Map<String, EnumValueDescriptor> private final Map<Integer, EnumValueDescriptor> private final List<EnumValueDescriptor> Fields inherited from class ReservableDescriptor
reservedNames, reservedNumbersFields inherited from class AnnotatedDescriptorImpl
annotations, documentation, fullName, name, processedAnnotations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCompatibility(EnumDescriptor that, boolean strict, List<String> errors) private voidcheckReserved(EnumValueDescriptor value) findValueByName(String name) findValueByNumber(int number) protected 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 descriptor(package private) voidsetContainingType(Descriptor containingType) (package private) voidsetFileDescriptor(FileDescriptor fileDescriptor) toString()Methods inherited from class ReservableDescriptor
checkReservation, getReservedNames, getReservedNumbersMethods inherited from class AnnotatedDescriptorImpl
getAnnotations, getAnnotationsConfig, getDocumentation, getFullName, getName, getProcessedAnnotationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AnnotatedDescriptor
getAnnotations, getDocumentation, getFullName, getName, getProcessedAnnotation
-
Field Details
-
typeId
-
options
-
values
-
valueByNumber
-
valueByName
-
fileDescriptor
-
containingType
-
-
Constructor Details
-
EnumDescriptor
-
-
Method Details
-
checkReserved
-
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
-
getFileDescriptor
Description copied from interface:AnnotatedDescriptorReturn the containing files's descriptor- Specified by:
getFileDescriptorin interfaceAnnotatedDescriptor- Returns:
- the containing files's descriptor (never
null)
-
getTypeId
- Specified by:
getTypeIdin interfaceGenericDescriptor
-
getContainingType
- Specified by:
getContainingTypein interfaceGenericDescriptor
-
setContainingType
-
getOptions
-
getOption
-
getValues
-
findValueByNumber
-
findValueByName
-
setFileDescriptor
-
toString
-
checkCompatibility
-