public class CombinedWiringFactory extends java.lang.Object implements WiringFactory
WiringFactory
s together to act as one. It asks each one
whether it handles a type and delegates to the first one to answer yes.Constructor and Description |
---|
CombinedWiringFactory(java.util.List<WiringFactory> factories) |
Modifier and Type | Method and Description |
---|---|
DataFetcher |
getDataFetcher(TypeDefinitionRegistry registry,
FieldDefinition definition)
Returns a
DataFetcher given the type definition |
TypeResolver |
getTypeResolver(TypeDefinitionRegistry registry,
InterfaceTypeDefinition definition)
Returns a
TypeResolver given the type interface |
TypeResolver |
getTypeResolver(TypeDefinitionRegistry registry,
UnionTypeDefinition definition)
Returns a
TypeResolver given the type union |
boolean |
providesDataFetcher(TypeDefinitionRegistry registry,
FieldDefinition definition)
This is called to ask if this factory can provide a data fetcher for the definition
|
boolean |
providesTypeResolver(TypeDefinitionRegistry registry,
InterfaceTypeDefinition definition)
This is called to ask if this factory can provide a type resolver for the interface
|
boolean |
providesTypeResolver(TypeDefinitionRegistry registry,
UnionTypeDefinition definition)
This is called to ask if this factory can provide a type resolver for the union
|
public CombinedWiringFactory(java.util.List<WiringFactory> factories)
public boolean providesTypeResolver(TypeDefinitionRegistry registry, InterfaceTypeDefinition definition)
WiringFactory
providesTypeResolver
in interface WiringFactory
registry
- the registry of all typesdefinition
- the definition to be resolvedpublic boolean providesTypeResolver(TypeDefinitionRegistry registry, UnionTypeDefinition definition)
WiringFactory
providesTypeResolver
in interface WiringFactory
registry
- the registry of all typesdefinition
- the definition to be resolvedpublic TypeResolver getTypeResolver(TypeDefinitionRegistry registry, InterfaceTypeDefinition definition)
WiringFactory
TypeResolver
given the type interfacegetTypeResolver
in interface WiringFactory
registry
- the registry of all typesdefinition
- the definition to be resolvedTypeResolver
public TypeResolver getTypeResolver(TypeDefinitionRegistry registry, UnionTypeDefinition definition)
WiringFactory
TypeResolver
given the type uniongetTypeResolver
in interface WiringFactory
registry
- the registry of all typesdefinition
- the definition to be resolvedTypeResolver
public boolean providesDataFetcher(TypeDefinitionRegistry registry, FieldDefinition definition)
WiringFactory
providesDataFetcher
in interface WiringFactory
registry
- the registry of all typesdefinition
- the field definition in playpublic DataFetcher getDataFetcher(TypeDefinitionRegistry registry, FieldDefinition definition)
WiringFactory
DataFetcher
given the type definitiongetDataFetcher
in interface WiringFactory
registry
- the registry of all typesdefinition
- the definition to be resolvedDataFetcher