Module io.helidon.service.codegen
Package io.helidon.service.codegen
Interface ServiceContracts.FactoryAnalysis
- Enclosing class:
ServiceContracts
public static interface ServiceContracts.FactoryAnalysis
Result of analysis of provided contracts.
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a new result for cases where the service does not implement the factory interface.create
(TypeName factoryType, TypeName providedType, TypeInfo providedTypeInfo, Set<ResolvedType> providedContracts) The requested factory interface is implemented and provides one or more contracts.Type of the factory interface with type arguments (such asSupplier×String>
, guard access byvalid()
).All contracts transitively inherited from the provided type (guard access byvalid()
).The contract provided (guard access byvalid()
).Type info of the provided type.boolean
valid()
whether the factory interface is implemented.
-
Method Details
-
create
Create a new result for cases where the service does not implement the factory interface.- Returns:
- a new factory analysis that is not
valid()
-
create
static ServiceContracts.FactoryAnalysis create(TypeName factoryType, TypeName providedType, TypeInfo providedTypeInfo, Set<ResolvedType> providedContracts) The requested factory interface is implemented and provides one or more contracts.- Parameters:
factoryType
- type of the factory implementation (such asSupplier<String>
)providedType
- the type provided (always a contract)providedTypeInfo
- type info of the provided typeprovidedContracts
- transitive contracts (includes the provided type as well)- Returns:
- a new analysis result for a valid factory implementation
-
valid
boolean valid()whether the factory interface is implemented.- Returns:
- if the factory interface is implemented by the service
-
factoryType
TypeName factoryType()Type of the factory interface with type arguments (such asSupplier×String>
, guard access byvalid()
).- Returns:
- factory type name
-
providedType
TypeName providedType()The contract provided (guard access byvalid()
).- Returns:
- provided type name
-
providedTypeInfo
TypeInfo providedTypeInfo()Type info of the provided type.- Returns:
- type info of the
providedType()
-
providedContracts
Set<ResolvedType> providedContracts()All contracts transitively inherited from the provided type (guard access byvalid()
).- Returns:
- provided contracts
-