Package com.linecorp.armeria.server.docs
Interface NamedTypeInfoProvider
- 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
NamedTypeInfo
loaded dynamically via Java SPI (Service Provider Interface).
The loaded NamedTypeInfoProvider
s are used in the DocServicePlugin
s to extract
a NamedTypeInfo
from the given typeDescriptor
.-
Method Summary
Modifier and TypeMethodDescriptionnewNamedTypeInfo
(Object typeDescriptor) Creates a newNamedTypeInfo
for the specifiedtypeDescriptor
.default NamedTypeInfoProvider
orElse
(NamedTypeInfoProvider other) Returns a newly createdNamedTypeInfoProvider
that tries thisNamedTypeInfoProvider
first and then the specifiedNamedTypeInfoProvider
when the first call returnsnull
.
-
Method Details
-
newNamedTypeInfo
Creates a newNamedTypeInfo
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
NamedTypeInfo
.null
if thisNamedTypeInfoProvider
cannot convert thetypeDescriptor
to theNamedTypeInfo
.
-
orElse
Returns a newly createdNamedTypeInfoProvider
that tries thisNamedTypeInfoProvider
first and then the specifiedNamedTypeInfoProvider
when the first call returnsnull
.
-