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 ObjectconvertOutput(Object original, AnnotatedType type, ResolutionEnvironment env)List<AnnotatedType>getDerivedTypes(AnnotatedType type)AnnotatedTypegetSubstituteType(AnnotatedType original)Returns the type to map instead of the original.booleanisTransparent()ADelegatingOutputConverteris considered transparent if its sole purpose is to delegate to other converters, and contains no other logic of its own.booleansupports(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:AbstractTypeSubstitutingMapperReturns the type to map instead of the original. This implementation always returns the type of the generic type parameterS.- Specified by:
getSubstituteTypein interfaceTypeSubstituter- Overrides:
getSubstituteTypein 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:
convertOutputin interfaceOutputConverter
-
getDerivedTypes
public List<AnnotatedType> getDerivedTypes(AnnotatedType type)
- Specified by:
getDerivedTypesin interfaceDelegatingOutputConverter
-
isTransparent
public boolean isTransparent()
Description copied from interface:DelegatingOutputConverterADelegatingOutputConverteris 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:
isTransparentin interfaceDelegatingOutputConverter- Returns:
- A boolean signifying whether the converter is transparent.
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supportsin interfaceOutputConverter- Specified by:
supportsin interfaceTypeMapper
-
-