Class KobbyKotlinExtension
-
- All Implemented Interfaces:
public class KobbyKotlinExtensionConfiguration of Kotlin DSL generation
-
-
Field Summary
Fields Modifier and Type Field Description private Booleanenabledprivate Map<String, KotlinType>scalarsprivate BooleanrelativePackageprivate StringpackageNameprivate DirectoryoutputDirectoryprivate final KotlinTypetypeAnyprivate final KotlinTypetypeNumberprivate final KotlinTypetypeByteprivate final KotlinTypetypeShortprivate final KotlinTypetypeIntprivate final KotlinTypetypeLongprivate final KotlinTypetypeFloatprivate final KotlinTypetypeDoubleprivate final KotlinTypetypeCharprivate final KotlinTypetypeStringprivate final KotlinTypetypeCharSequenceprivate final KotlinTypetypeBooleanprivate final KotlinTypetypeEnumprivate final KotlinTypetypeThrowableprivate final KotlinTypetypeComparableprivate final KotlinTypetypeIterableprivate final KotlinTypetypeCollectionprivate final KotlinTypetypeListprivate final KotlinTypetypeSetprivate final KotlinTypetypeMapprivate final KotlinTypetypeMutableIterableprivate final KotlinTypetypeMutableCollectionprivate final KotlinTypetypeMutableListprivate final KotlinTypetypeMutableSetprivate final KotlinTypetypeMutableMapprivate final KotlinTypetypeArrayprivate final KotlinTypetypeBooleanArrayprivate final KotlinTypetypeByteArrayprivate final KotlinTypetypeCharArrayprivate final KotlinTypetypeShortArrayprivate final KotlinTypetypeIntArrayprivate final KotlinTypetypeLongArrayprivate final KotlinTypetypeFloatArrayprivate final KotlinTypetypeDoubleArray
-
Constructor Summary
Constructors Constructor Description KobbyKotlinExtension()
-
Method Summary
Modifier and Type Method Description final BooleangetEnabled()Is Kotlin DSL generation enabledDefault: true final UnitsetEnabled(Boolean enabled)Is Kotlin DSL generation enabledDefault: true final Map<String, KotlinType>getScalars()Mapping GraphQL scalars to Kotlin classes final UnitsetScalars(Map<String, KotlinType> scalars)Mapping GraphQL scalars to Kotlin classes final BooleangetRelativePackage()Is root package name for generated DSL should be relative to GraphQL schema directoryDefault: true final UnitsetRelativePackage(Boolean relativePackage)Is root package name for generated DSL should be relative to GraphQL schema directoryDefault: true final StringgetPackageName()Root package name for generated DSLDefault: "kobby. final UnitsetPackageName(String packageName)Root package name for generated DSLDefault: "kobby. final DirectorygetOutputDirectory()Output directory for generated DSLDefault: project.layout.buildDirectory.dir("generated/sources/kobby/main/kotlin"). final UnitsetOutputDirectory(Directory outputDirectory)Output directory for generated DSLDefault: project.layout.buildDirectory.dir("generated/sources/kobby/main/kotlin"). final KotlinTypegetTypeAny()final KotlinTypegetTypeNumber()final KotlinTypegetTypeByte()final KotlinTypegetTypeShort()final KotlinTypegetTypeInt()final KotlinTypegetTypeLong()final KotlinTypegetTypeFloat()final KotlinTypegetTypeDouble()final KotlinTypegetTypeChar()final KotlinTypegetTypeString()final KotlinTypegetTypeCharSequence()final KotlinTypegetTypeBoolean()final KotlinTypegetTypeEnum()final KotlinTypegetTypeThrowable()final KotlinTypegetTypeComparable()final KotlinTypegetTypeIterable()final KotlinTypegetTypeCollection()final KotlinTypegetTypeList()final KotlinTypegetTypeSet()final KotlinTypegetTypeMap()final KotlinTypegetTypeMutableIterable()final KotlinTypegetTypeMutableCollection()final KotlinTypegetTypeMutableList()final KotlinTypegetTypeMutableSet()final KotlinTypegetTypeMutableMap()final KotlinTypegetTypeArray()final KotlinTypegetTypeBooleanArray()final KotlinTypegetTypeByteArray()final KotlinTypegetTypeCharArray()final KotlinTypegetTypeShortArray()final KotlinTypegetTypeIntArray()final KotlinTypegetTypeLongArray()final KotlinTypegetTypeFloatArray()final KotlinTypegetTypeDoubleArray()final Unitcontext(Action<KobbyKotlinContextExtension> action)Configuration of DSL context generation (entry point to DSL) final Unitdto(Action<KobbyKotlinDtoExtension> action)Configuration of DTO classes generation final Unitentity(Action<KobbyKotlinEntityExtension> action)Configuration of DSL Entities interfaces generation final Unitimpl(Action<KobbyKotlinImplExtension> action)Configuration of DSL Entities implementation classes generation final Unitadapter(Action<KobbyKotlinAdapterExtension> action)Configuration of adapter classes generation final Unitresolver(Action<KobbyKotlinResolverExtension> action)Configuration of resolver interfaces generation final KotlinTypetypeOf(String packageName, String className, KotlinType arguments)Define Kotlin type for scalar mapping final KotlinTypetypeOf(String packageName, String className, Boolean nullable, KotlinType arguments)Define Kotlin type for scalar mapping -
-
Method Detail
-
getEnabled
final Boolean getEnabled()
Is Kotlin DSL generation enabled
Default: true
-
setEnabled
final Unit setEnabled(Boolean enabled)
Is Kotlin DSL generation enabled
Default: true
-
getScalars
final Map<String, KotlinType> getScalars()
Mapping GraphQL scalars to Kotlin classes
-
setScalars
final Unit setScalars(Map<String, KotlinType> scalars)
Mapping GraphQL scalars to Kotlin classes
-
getRelativePackage
final Boolean getRelativePackage()
Is root package name for generated DSL should be relative to GraphQL schema directory
Default: true
-
setRelativePackage
final Unit setRelativePackage(Boolean relativePackage)
Is root package name for generated DSL should be relative to GraphQL schema directory
Default: true
-
getPackageName
final String getPackageName()
Root package name for generated DSL
Default: "kobby.kotlin"
-
setPackageName
final Unit setPackageName(String packageName)
Root package name for generated DSL
Default: "kobby.kotlin"
-
getOutputDirectory
final Directory getOutputDirectory()
Output directory for generated DSL
Default: project.layout.buildDirectory.dir("generated/sources/kobby/main/kotlin").get()
-
setOutputDirectory
final Unit setOutputDirectory(Directory outputDirectory)
Output directory for generated DSL
Default: project.layout.buildDirectory.dir("generated/sources/kobby/main/kotlin").get()
-
getTypeAny
final KotlinType getTypeAny()
-
getTypeNumber
final KotlinType getTypeNumber()
-
getTypeByte
final KotlinType getTypeByte()
-
getTypeShort
final KotlinType getTypeShort()
-
getTypeInt
final KotlinType getTypeInt()
-
getTypeLong
final KotlinType getTypeLong()
-
getTypeFloat
final KotlinType getTypeFloat()
-
getTypeDouble
final KotlinType getTypeDouble()
-
getTypeChar
final KotlinType getTypeChar()
-
getTypeString
final KotlinType getTypeString()
-
getTypeCharSequence
final KotlinType getTypeCharSequence()
-
getTypeBoolean
final KotlinType getTypeBoolean()
-
getTypeEnum
final KotlinType getTypeEnum()
-
getTypeThrowable
final KotlinType getTypeThrowable()
-
getTypeComparable
final KotlinType getTypeComparable()
-
getTypeIterable
final KotlinType getTypeIterable()
-
getTypeCollection
final KotlinType getTypeCollection()
-
getTypeList
final KotlinType getTypeList()
-
getTypeSet
final KotlinType getTypeSet()
-
getTypeMap
final KotlinType getTypeMap()
-
getTypeMutableIterable
final KotlinType getTypeMutableIterable()
-
getTypeMutableCollection
final KotlinType getTypeMutableCollection()
-
getTypeMutableList
final KotlinType getTypeMutableList()
-
getTypeMutableSet
final KotlinType getTypeMutableSet()
-
getTypeMutableMap
final KotlinType getTypeMutableMap()
-
getTypeArray
final KotlinType getTypeArray()
-
getTypeBooleanArray
final KotlinType getTypeBooleanArray()
-
getTypeByteArray
final KotlinType getTypeByteArray()
-
getTypeCharArray
final KotlinType getTypeCharArray()
-
getTypeShortArray
final KotlinType getTypeShortArray()
-
getTypeIntArray
final KotlinType getTypeIntArray()
-
getTypeLongArray
final KotlinType getTypeLongArray()
-
getTypeFloatArray
final KotlinType getTypeFloatArray()
-
getTypeDoubleArray
final KotlinType getTypeDoubleArray()
-
context
final Unit context(Action<KobbyKotlinContextExtension> action)
Configuration of DSL context generation (entry point to DSL)
-
dto
final Unit dto(Action<KobbyKotlinDtoExtension> action)
Configuration of DTO classes generation
-
entity
final Unit entity(Action<KobbyKotlinEntityExtension> action)
Configuration of DSL Entities interfaces generation
-
impl
final Unit impl(Action<KobbyKotlinImplExtension> action)
Configuration of DSL Entities implementation classes generation
-
adapter
final Unit adapter(Action<KobbyKotlinAdapterExtension> action)
Configuration of adapter classes generation
-
resolver
final Unit resolver(Action<KobbyKotlinResolverExtension> action)
Configuration of resolver interfaces generation
-
typeOf
final KotlinType typeOf(String packageName, String className, KotlinType arguments)
Define Kotlin type for scalar mapping
- Parameters:
packageName- package name of Kotlin type (for example "kotlin.className- class name of Kotlin type (for example "Map")arguments- generic arguments of Kotlin type
-
typeOf
final KotlinType typeOf(String packageName, String className, Boolean nullable, KotlinType arguments)
Define Kotlin type for scalar mapping
- Parameters:
packageName- package name of Kotlin type (for example "kotlin.className- class name of Kotlin type (for example "Map")nullable- is defining type nullablearguments- generic arguments of Kotlin type
-
-
-
-