File tree Expand file tree Collapse file tree
lib/src/main/kotlin/com/openmeteo/apix/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import java.net.URL
1010import javax.net.ssl.HttpsURLConnection
1111
1212abstract class Endpoint (
13+ @Transient
1314 val context : URL ,
1415) : Http<InputStream>, Query {
1516
Original file line number Diff line number Diff line change @@ -4,10 +4,7 @@ import kotlinx.serialization.*
44import java.net.URL
55import kotlin.reflect.KClass
66import kotlin.reflect.KProperty1
7- import kotlin.reflect.full.declaredMemberProperties
8- import kotlin.reflect.full.findAnnotation
9- import kotlin.reflect.full.hasAnnotation
10- import kotlin.reflect.full.superclasses
7+ import kotlin.reflect.full.*
118
129interface Query {
1310
@@ -38,8 +35,8 @@ interface Query {
3835 private fun value (property : KProperty1 <Query , * >) =
3936 property.get(this )?.let { Companion .value(it) }
4037
41- private val nonTransientDeclaredMemberProperties get() =
42- javaClass.kotlin.declaredMemberProperties
38+ private val memberProperties get() =
39+ javaClass.kotlin.memberProperties
4340 .filter { ! it.hasAnnotation<Transient >() }
4441
4542 /* *
@@ -48,7 +45,7 @@ interface Query {
4845 * Please note that pairs with null values are filtered out.
4946 */
5047 fun toList () =
51- nonTransientDeclaredMemberProperties
48+ memberProperties
5249 .mapNotNull { value(it)?.let { v -> key(it, javaClass.kotlin) to v } }
5350
5451 fun toMap () =
You can’t perform that action at this time.
0 commit comments