-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP Split library primitives into parameterize-api
TODO Tests? Deprecated in original library
- Loading branch information
1 parent
2bbbab2
commit 067b9d7
Showing
12 changed files
with
224 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
public abstract interface annotation class com/benwoodworth/parameterize/ExperimentalParameterizeApi : java/lang/annotation/Annotation { | ||
} | ||
|
||
public final class com/benwoodworth/parameterize/LazyParameterScope { | ||
public static final synthetic fun box-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/LazyParameterScope; | ||
public static fun constructor-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/ParameterizeScope; | ||
public fun equals (Ljava/lang/Object;)Z | ||
public static fun equals-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Object;)Z | ||
public static final fun equals-impl0 (Lcom/benwoodworth/parameterize/ParameterizeScope;Lcom/benwoodworth/parameterize/ParameterizeScope;)Z | ||
public fun hashCode ()I | ||
public static fun hashCode-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)I | ||
public static final fun provideDelegate-13mUnGw (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; | ||
public fun toString ()Ljava/lang/String; | ||
public static fun toString-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Ljava/lang/String; | ||
public final synthetic fun unbox-impl ()Lcom/benwoodworth/parameterize/ParameterizeScope; | ||
} | ||
|
||
public abstract interface class com/benwoodworth/parameterize/ParameterizeScope { | ||
public abstract fun getValue (Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; | ||
public abstract fun provideDelegate-13mUnGw (Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; | ||
} | ||
|
||
public final class com/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter { | ||
public fun <init> (Ljava/lang/Object;)V | ||
public final fun getArgument ()Ljava/lang/Object; | ||
public fun toString ()Ljava/lang/String; | ||
} | ||
|
||
public final class com/benwoodworth/parameterize/ParameterizeScope$Parameter { | ||
public static final synthetic fun box-impl (Lkotlin/sequences/Sequence;)Lcom/benwoodworth/parameterize/ParameterizeScope$Parameter; | ||
public static fun constructor-impl (Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; | ||
public fun equals (Ljava/lang/Object;)Z | ||
public static fun equals-impl (Lkotlin/sequences/Sequence;Ljava/lang/Object;)Z | ||
public static final fun equals-impl0 (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Z | ||
public final fun getArguments ()Lkotlin/sequences/Sequence; | ||
public fun hashCode ()I | ||
public static fun hashCode-impl (Lkotlin/sequences/Sequence;)I | ||
public fun toString ()Ljava/lang/String; | ||
public static fun toString-impl (Lkotlin/sequences/Sequence;)Ljava/lang/String; | ||
public final synthetic fun unbox-impl ()Lkotlin/sequences/Sequence; | ||
} | ||
|
||
public final class com/benwoodworth/parameterize/ParameterizeScope$ParameterDelegate { | ||
} | ||
|
||
public final class com/benwoodworth/parameterize/ParameterizeScopeKt { | ||
public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Iterable;)Lkotlin/sequences/Sequence; | ||
public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; | ||
public static final fun parameterLazyIterable (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; | ||
public static final fun parameterLazySequence (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; | ||
public static final fun parameterOf (Lcom/benwoodworth/parameterize/ParameterizeScope;[Ljava/lang/Object;)Lkotlin/sequences/Sequence; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Klib ABI Dump | ||
// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, wasmWasi, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] | ||
// Rendering settings: | ||
// - Signature version: 2 | ||
// - Show manifest properties: true | ||
// - Show declarations: true | ||
|
||
// Library unique name: <com.benwoodworth.parameterize:parameterize-api> | ||
open annotation class com.benwoodworth.parameterize/ExperimentalParameterizeApi : kotlin/Annotation { // com.benwoodworth.parameterize/ExperimentalParameterizeApi|null[0] | ||
constructor <init>() // com.benwoodworth.parameterize/ExperimentalParameterizeApi.<init>|<init>(){}[0] | ||
} | ||
|
||
abstract interface com.benwoodworth.parameterize/ParameterizeScope { // com.benwoodworth.parameterize/ParameterizeScope|null[0] | ||
abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1>).getValue(kotlin/Any?, kotlin.reflect/KProperty<*>): #A1 // com.benwoodworth.parameterize/ParameterizeScope.getValue|getValue@com.benwoodworth.parameterize.ParameterizeScope.DeclaredParameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§<kotlin.Any?>}[0] | ||
abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/ParameterizeScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§<kotlin.Any?>}[0] | ||
|
||
final class <#A1: kotlin/Any?> ParameterDelegate // com.benwoodworth.parameterize/ParameterizeScope.ParameterDelegate|null[0] | ||
|
||
final class <#A1: out kotlin/Any?> DeclaredParameter { // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter|null[0] | ||
constructor <init>(#A1) // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.<init>|<init>(1:0){}[0] | ||
|
||
final val argument // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.argument|{}argument[0] | ||
final fun <get-argument>(): #A1 // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.argument.<get-argument>|<get-argument>(){}[0] | ||
|
||
final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.toString|toString(){}[0] | ||
} | ||
|
||
final value class <#A1: out kotlin/Any?> Parameter { // com.benwoodworth.parameterize/ParameterizeScope.Parameter|null[0] | ||
constructor <init>(kotlin.sequences/Sequence<#A1>) // com.benwoodworth.parameterize/ParameterizeScope.Parameter.<init>|<init>(kotlin.sequences.Sequence<1:0>){}[0] | ||
|
||
final val arguments // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments|{}arguments[0] | ||
final fun <get-arguments>(): kotlin.sequences/Sequence<#A1> // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments.<get-arguments>|<get-arguments>(){}[0] | ||
|
||
final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/ParameterizeScope.Parameter.equals|equals(kotlin.Any?){}[0] | ||
final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/ParameterizeScope.Parameter.hashCode|hashCode(){}[0] | ||
final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.Parameter.toString|toString(){}[0] | ||
} | ||
} | ||
|
||
final value class com.benwoodworth.parameterize/LazyParameterScope { // com.benwoodworth.parameterize/LazyParameterScope|null[0] | ||
constructor <init>(com.benwoodworth.parameterize/ParameterizeScope) // com.benwoodworth.parameterize/LazyParameterScope.<init>|<init>(com.benwoodworth.parameterize.ParameterizeScope){}[0] | ||
|
||
final fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/LazyParameterScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§<kotlin.Any?>}[0] | ||
final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/LazyParameterScope.equals|equals(kotlin.Any?){}[0] | ||
final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/LazyParameterScope.hashCode|hashCode(){}[0] | ||
final fun toString(): kotlin/String // com.benwoodworth.parameterize/LazyParameterScope.toString|toString(){}[0] | ||
} | ||
|
||
final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.collections/Iterable<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|[email protected](kotlin.collections.Iterable<0:0>){0§<kotlin.Any?>}[0] | ||
final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.sequences/Sequence<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|[email protected](kotlin.sequences.Sequence<0:0>){0§<kotlin.Any?>}[0] | ||
final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameterOf(kotlin/Array<out #A>...): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameterOf|[email protected](kotlin.Array<out|0:0>...){0§<kotlin.Any?>}[0] | ||
final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1<com.benwoodworth.parameterize/LazyParameterScope, kotlin.collections/Iterable<#A>>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|[email protected](kotlin.Function1<com.benwoodworth.parameterize.LazyParameterScope,kotlin.collections.Iterable<0:0>>){0§<kotlin.Any?>}[0] | ||
final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1<com.benwoodworth.parameterize/LazyParameterScope, kotlin.sequences/Sequence<#A>>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|[email protected](kotlin.Function1<com.benwoodworth.parameterize.LazyParameterScope,kotlin.sequences.Sequence<0:0>>){0§<kotlin.Any?>}[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2024 Ben Woodworth | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
id("kotlin-multiplatform-conventions") | ||
id("dokka-conventions") | ||
id("binary-compatibility-validator-conventions") | ||
id("publishing-conventions") | ||
id("ci-conventions") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
kotlin { | ||
sourceSets { | ||
configureEach { | ||
languageSettings { | ||
optIn("com.benwoodworth.parameterize.internal.ParameterizeApiFriendModuleApi") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2024 Ben Woodworth | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.benwoodworth.parameterize | ||
|
||
import kotlin.annotation.AnnotationTarget.* | ||
|
||
/** | ||
* Marks declarations that are still **experimental** in Parameterize, which means that the design of the corresponding | ||
* declarations has open issues which may (or may not) lead to their changes in the future. Roughly speaking, there is a | ||
* chance that those declarations will be deprecated in the near future or the semantics of their behavior may change in | ||
* some way that may break some code. | ||
*/ | ||
@MustBeDocumented | ||
@Retention(AnnotationRetention.BINARY) | ||
@Target( | ||
CLASS, ANNOTATION_CLASS, TYPEALIAS, | ||
PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, | ||
CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER | ||
) | ||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING) | ||
public annotation class ExperimentalParameterizeApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
parameterize-api/src/commonMain/kotlin/internal/InternalAnnotations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright 2024 Ben Woodworth | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.benwoodworth.parameterize.internal | ||
|
||
@RequiresOptIn(level = RequiresOptIn.Level.ERROR) | ||
@Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY) | ||
internal annotation class ParameterizeApiFriendModuleApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.