Class ArrayAdapter
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
-
- io.leangen.graphql.generator.mapping.common.ArrayAdapter
-
- All Implemented Interfaces:
DelegatingOutputConverter
,OutputConverter
,TypeMapper
,TypeSubstituter
public class ArrayAdapter extends AbstractTypeSubstitutingMapper implements DelegatingOutputConverter
- Author:
- Bojan Tomic (kaqqao)
-
-
Field Summary
-
Fields inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
substituteType
-
-
Constructor Summary
Constructors Constructor Description ArrayAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convertOutput(Object original, AnnotatedType type, ResolutionEnvironment env)
List<AnnotatedType>
getDerivedTypes(AnnotatedType type)
AnnotatedType
getSubstituteType(AnnotatedType original)
Returns the type to map instead of the original.boolean
isTransparent()
ADelegatingOutputConverter
is considered transparent if its sole purpose is to delegate to other converters, and contains no other logic of its own.boolean
supports(AnnotatedElement element, AnnotatedType type)
-
Methods inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
toGraphQLInputType, toGraphQLType
-
-
-
-
Method Detail
-
getSubstituteType
public AnnotatedType getSubstituteType(AnnotatedType original)
Description copied from class:AbstractTypeSubstitutingMapper
Returns the type to map instead of the original. This implementation always returns the type of the generic type parameterS
.- Specified by:
getSubstituteType
in interfaceTypeSubstituter
- Overrides:
getSubstituteType
in classAbstractTypeSubstitutingMapper
- Parameters:
original
- The type to be replaced- Returns:
- The substitute type to use for mapping
-
convertOutput
public Object convertOutput(Object original, AnnotatedType type, ResolutionEnvironment env)
- Specified by:
convertOutput
in interfaceOutputConverter
-
getDerivedTypes
public List<AnnotatedType> getDerivedTypes(AnnotatedType type)
- Specified by:
getDerivedTypes
in interfaceDelegatingOutputConverter
-
isTransparent
public boolean isTransparent()
Description copied from interface:DelegatingOutputConverter
ADelegatingOutputConverter
is considered transparent if its sole purpose is to delegate to other converters, and contains no other logic of its own. In other words, if there is no reason to invoke it without other applicable converters present. This flag is purely a performance optimization hint, and is always safe to leave onfalse
.- Specified by:
isTransparent
in interfaceDelegatingOutputConverter
- Returns:
- A boolean signifying whether the converter is transparent.
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supports
in interfaceOutputConverter
- Specified by:
supports
in interfaceTypeMapper
-
-