All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gsonpath.model.FieldType.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package gsonpath.model

import com.squareup.javapoet.TypeName
import javax.lang.model.type.TypeMirror

sealed class FieldType {
    abstract val typeName: TypeName
    abstract val elementTypeMirror: TypeMirror

    data class Primitive(
            override val typeName: TypeName,
            override val elementTypeMirror: TypeMirror) : FieldType()

    data class Other(
            override val typeName: TypeName,
            override val elementTypeMirror: TypeMirror) : FieldType()

    data class MapFieldType(
            override val typeName: TypeName,
            override val elementTypeMirror: TypeMirror) : FieldType()

    sealed class MultipleValues : FieldType() {

        data class Array(
                override val typeName: TypeName,
                override val elementTypeMirror: TypeMirror) : MultipleValues()

        data class Collection(
                override val typeName: TypeName,
                override val elementTypeMirror: TypeMirror) : MultipleValues()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy