Package com.linecorp.armeria.server.docs
Interface DescriptiveTypeInfoProvider
- All Known Implementing Classes:
ProtobufDescriptiveTypeInfoProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Creates a new
DescriptiveTypeInfo
loaded dynamically via Java SPI (Service Provider Interface).
The loaded DescriptiveTypeInfoProvider
s are used in the DocServicePlugin
s to extract
a DescriptiveTypeInfo
from the given typeDescriptor
.-
Method Summary
Modifier and TypeMethodDescriptionnewDescriptiveTypeInfo
(Object typeDescriptor) Creates a newDescriptiveTypeInfo
for the specifiedtypeDescriptor
.default DescriptiveTypeInfoProvider
Returns a newly createdDescriptiveTypeInfoProvider
that tries thisDescriptiveTypeInfoProvider
first and then the specifiedDescriptiveTypeInfoProvider
when the first call returnsnull
.
-
Method Details
-
newDescriptiveTypeInfo
Creates a newDescriptiveTypeInfo
for the specifiedtypeDescriptor
. If anull
value is returned, aDocServicePlugin
will try to convert thetypeDescriptor
by the next converter.The type descriptor is different depending on the implementation of
DocServicePlugin
. One of the following type descriptions may be chosen to describe a type information.Class
forAnnotatedDocServicePlugin
com.google.protobuf.Descriptors.Descriptor
andcom.google.protobuf.Descriptors.EnumDescriptor
forGrpcDocServicePlugin
org.apache.thrift.TBase
org.apache.thrift.TEnum
andorg.apache.thrift.TException
forThriftDocServicePlugin
- Returns:
- a new
DescriptiveTypeInfo
.null
if thisDescriptiveTypeInfoProvider
cannot convert thetypeDescriptor
to theDescriptiveTypeInfo
.
-
orElse
Returns a newly createdDescriptiveTypeInfoProvider
that tries thisDescriptiveTypeInfoProvider
first and then the specifiedDescriptiveTypeInfoProvider
when the first call returnsnull
.
-