File tree 2 files changed +3
-1
lines changed
processor-kotlin/src/main/kotlin/testaccessors/internal
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public final class MyClassTestAccessors {
54
54
The processor-kotlin artifact generates Kotlin extension methods for the class that owns the
55
55
annotated fields for more idiomatic accessor usage.
56
56
``` kotlin
57
- object MyClassTestAccessors {
57
+ internal object MyClassTestAccessors {
58
58
fun <T > MyClass.myField (): T
59
59
60
60
fun <T > MyClass.myField (newValue : T )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.squareup.kotlinpoet.ClassName
6
6
import com.squareup.kotlinpoet.CodeBlock
7
7
import com.squareup.kotlinpoet.FileSpec
8
8
import com.squareup.kotlinpoet.FunSpec
9
+ import com.squareup.kotlinpoet.KModifier
9
10
import com.squareup.kotlinpoet.ParameterSpec
10
11
import com.squareup.kotlinpoet.TypeSpec
11
12
import com.squareup.kotlinpoet.TypeVariableName
@@ -41,6 +42,7 @@ internal class AccessorWriter(
41
42
elementUtils.getPackageOf(enclosingClassElement).qualifiedName.toString(), fileAndObjectName)
42
43
.indent(" " )
43
44
val objectSpecBuilder = TypeSpec .objectBuilder(fileAndObjectName)
45
+ .addModifiers(KModifier .INTERNAL )
44
46
annotatedElements.flatMap(object : (Element ) -> Iterable <FunSpec > {
45
47
override fun invoke (element : Element ) =
46
48
element.getAnnotation(RequiresAccessor ::class .java).requires.map {
You can’t perform that action at this time.
0 commit comments