@UnstableApi public final class ServiceSpecification extends Object
| Constructor and Description |
|---|
ServiceSpecification(Iterable<ServiceInfo> services,
Iterable<EnumInfo> enums,
Iterable<StructInfo> structs,
Iterable<ExceptionInfo> exceptions)
Creates a new instance.
|
ServiceSpecification(Iterable<ServiceInfo> services,
Iterable<EnumInfo> enums,
Iterable<StructInfo> structs,
Iterable<ExceptionInfo> exceptions,
Iterable<HttpHeaders> exampleHttpHeaders)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Set<EnumInfo> |
enums()
Returns the metadata about the enums related with the services in this specification.
|
List<HttpHeaders> |
exampleHttpHeaders()
Returns the example HTTP headers of the services in this specification.
|
Set<ExceptionInfo> |
exceptions()
Returns the metadata about the exceptions related with the services in this specification.
|
static ServiceSpecification |
generate(Iterable<ServiceInfo> services,
Function<TypeSignature,? extends NamedTypeInfo> namedTypeInfoFactory)
Generates a new
ServiceSpecification from the specified ServiceInfos and
the factory Function that creates NamedTypeInfos for the enum, struct or exception types
referred by the specified ServiceInfos. |
static ServiceSpecification |
merge(Iterable<ServiceSpecification> specs)
Merges the specified
ServiceSpecifications into one. |
Set<ServiceInfo> |
services()
Returns the metadata about the services in this specification.
|
Set<StructInfo> |
structs()
Returns the metadata about the structs related with the services in this specification.
|
public ServiceSpecification(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions)
public ServiceSpecification(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions, Iterable<HttpHeaders> exampleHttpHeaders)
public static ServiceSpecification merge(Iterable<ServiceSpecification> specs)
ServiceSpecifications into one.public static ServiceSpecification generate(Iterable<ServiceInfo> services, Function<TypeSignature,? extends NamedTypeInfo> namedTypeInfoFactory)
ServiceSpecification from the specified ServiceInfos and
the factory Function that creates NamedTypeInfos for the enum, struct or exception types
referred by the specified ServiceInfos.public Set<ServiceInfo> services()
public Set<EnumInfo> enums()
public Set<StructInfo> structs()
public Set<ExceptionInfo> exceptions()
public List<HttpHeaders> exampleHttpHeaders()
Copyright © 2020 LeanCloud. All rights reserved.