Class EnumDescriptor
- java.lang.Object
-
- org.infinispan.protostream.impl.AnnotatedDescriptorImpl
-
- org.infinispan.protostream.descriptors.EnumDescriptor
-
- All Implemented Interfaces:
AnnotatedDescriptor,GenericDescriptor
public final class EnumDescriptor extends AnnotatedDescriptorImpl implements GenericDescriptor
Represents an enum in a proto file.- Since:
- 2.0
- Author:
- gustavonalle, anistor@redhat.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnumDescriptor.Builder
-
Field Summary
-
Fields inherited from class org.infinispan.protostream.impl.AnnotatedDescriptorImpl
annotations, documentation, fullName, name, processedAnnotations
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumValueDescriptorfindValueByName(String name)EnumValueDescriptorfindValueByNumber(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.DescriptorgetContainingType()FileDescriptorgetFileDescriptor()Return the containing files's descriptorOptiongetOption(String name)List<Option>getOptions()IntegergetTypeId()List<EnumValueDescriptor>getValues()StringtoString()-
Methods inherited from class org.infinispan.protostream.impl.AnnotatedDescriptorImpl
getAnnotations, getAnnotationsConfig, getDocumentation, getFullName, getName, getProcessedAnnotation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.protostream.descriptors.AnnotatedDescriptor
getAnnotations, getDocumentation, getFullName, getName, getProcessedAnnotation
-
-
-
-
Method Detail
-
getAnnotationConfig
protected AnnotationConfiguration getAnnotationConfig(AnnotationElement.Annotation annotation)
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
public FileDescriptor getFileDescriptor()
Description copied from interface:AnnotatedDescriptorReturn the containing files's descriptor- Specified by:
getFileDescriptorin interfaceAnnotatedDescriptor- Returns:
- the containing files's descriptor (never
null)
-
getTypeId
public Integer getTypeId()
- Specified by:
getTypeIdin interfaceGenericDescriptor
-
getContainingType
public Descriptor getContainingType()
- Specified by:
getContainingTypein interfaceGenericDescriptor
-
getValues
public List<EnumValueDescriptor> getValues()
-
findValueByNumber
public EnumValueDescriptor findValueByNumber(int number)
-
findValueByName
public EnumValueDescriptor findValueByName(String name)
-
-