Class Descriptor
- java.lang.Object
-
- org.infinispan.protostream.impl.AnnotatedDescriptorImpl
-
- org.infinispan.protostream.descriptors.Descriptor
-
- All Implemented Interfaces:
AnnotatedDescriptor
,GenericDescriptor
public final class Descriptor extends AnnotatedDescriptorImpl implements GenericDescriptor
Represents a message type declaration in a proto file.- Since:
- 2.0
- Author:
- gustavonalle, [email protected]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Descriptor.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 boolean
equals(Object o)
FieldDescriptor
findFieldByName(String name)
FieldDescriptor
findFieldByNumber(int number)
protected AnnotationConfiguration
getAnnotationConfig(AnnotationElement.Annotation annotation)
Subclasses are responsible for fetching theAnnotationConfiguration
from the appropriate config (it it exists) and to validate that the target is suitable.Descriptor
getContainingType()
List<EnumDescriptor>
getEnumTypes()
List<FieldDescriptor>
getFields()
FileDescriptor
getFileDescriptor()
Return the containing files's descriptorList<Descriptor>
getNestedTypes()
List<OneOfDescriptor>
getOneOfs()
Option
getOption(String name)
List<Option>
getOptions()
Integer
getTypeId()
int
hashCode()
String
toString()
-
Methods inherited from class org.infinispan.protostream.impl.AnnotatedDescriptorImpl
getAnnotations, getAnnotationsConfig, getDocumentation, getFullName, getName, getProcessedAnnotation
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.protostream.descriptors.AnnotatedDescriptor
getAnnotations, getDocumentation, getFullName, getName, getProcessedAnnotation
-
-
-
-
Method Detail
-
getFileDescriptor
public FileDescriptor getFileDescriptor()
Description copied from interface:AnnotatedDescriptor
Return the containing files's descriptor- Specified by:
getFileDescriptor
in interfaceAnnotatedDescriptor
- Returns:
- the containing files's descriptor (never
null
)
-
getFields
public List<FieldDescriptor> getFields()
-
getOneOfs
public List<OneOfDescriptor> getOneOfs()
-
getNestedTypes
public List<Descriptor> getNestedTypes()
-
getEnumTypes
public List<EnumDescriptor> getEnumTypes()
-
findFieldByNumber
public FieldDescriptor findFieldByNumber(int number)
-
findFieldByName
public FieldDescriptor findFieldByName(String name)
-
getTypeId
public Integer getTypeId()
- Specified by:
getTypeId
in interfaceGenericDescriptor
-
getContainingType
public Descriptor getContainingType()
- Specified by:
getContainingType
in interfaceGenericDescriptor
-
getAnnotationConfig
protected AnnotationConfiguration getAnnotationConfig(AnnotationElement.Annotation annotation)
Description copied from class:AnnotatedDescriptorImpl
Subclasses are responsible for fetching theAnnotationConfiguration
from the appropriate config (it it exists) and to validate that the target is suitable.- Specified by:
getAnnotationConfig
in classAnnotatedDescriptorImpl
- Returns:
- null if the annotation is not found
-
-