Interface AnnotatedDescriptor
- All Known Subinterfaces:
GenericDescriptor
- All Known Implementing Classes:
AnnotatedDescriptorImpl,Descriptor,EnumDescriptor,FieldDescriptor,MapDescriptor,RepeatedFieldDescriptor,ReservableDescriptor
public interface AnnotatedDescriptor
Base class for all descriptors. Provides common methods for naming, accessing the attached documentation and
annotations.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionReturn the documentation text associated with this descriptor.Return the containing files's descriptorReturn the full name of the descriptor.getName()Return the name of the descriptor.<T> TgetProcessedAnnotation(String annotationName) Get the 'processed' annotation object created by the registeredAnnotationMetadataCreatorornullif the annotation is missing or noAnnotationMetadataCreatorwas registered.
-
Method Details
-
getName
String getName()Return the name of the descriptor.- Returns:
- the name of the descriptor (never
null)
-
getFullName
String getFullName()Return the full name of the descriptor.- Returns:
- the name of the descriptor (never
null)
-
getFileDescriptor
FileDescriptor getFileDescriptor()Return the containing files's descriptor- Returns:
- the containing files's descriptor (never
null)
-
getDocumentation
String getDocumentation()Return the documentation text associated with this descriptor.- Returns:
- the documentation text or
nullif not present
-
getAnnotations
- Throws:
AnnotationParserException
-
getProcessedAnnotation
Get the 'processed' annotation object created by the registeredAnnotationMetadataCreatorornullif the annotation is missing or noAnnotationMetadataCreatorwas registered.- Type Parameters:
T- the expected type of the object created by theAnnotationMetadataCreator- Parameters:
annotationName- the name of the annotation- Returns:
- the 'processed' annotation object or
nullif not found - Throws:
AnnotationParserException- if parsing of annotations fails
-