diff options
| author | 2024-03-01 08:23:31 -0500 | |
|---|---|---|
| committer | 2024-03-01 13:24:13 +0000 | |
| commit | c20c32784f927e9198ed2d13e8999a98bd87bdec (patch) | |
| tree | f61a5acbbf3a460f808cfc3b9bb1f77c300290d8 /java/src | |
| parent | b30980f3b00e5ef54c6a2953612f38f1af75fe56 (diff) | |
Adds @JavaInterop, a @RequiresOptIn for marking Java interop code
"This is a a property, function or class specifically
supporting Java interoperability. Usage from Kotlin
should be limited to interactions with Java"
Bug: 309960444
Test: This is just an annotation.
Change-Id: Ia2f21bd5d4359ba22e1292ebebbef77707706ac9
Diffstat (limited to 'java/src')
| -rw-r--r-- | java/src/com/android/intentresolver/v2/annotation/JavaInterop.kt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/java/src/com/android/intentresolver/v2/annotation/JavaInterop.kt b/java/src/com/android/intentresolver/v2/annotation/JavaInterop.kt new file mode 100644 index 00000000..15c5018a --- /dev/null +++ b/java/src/com/android/intentresolver/v2/annotation/JavaInterop.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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.android.intentresolver.v2.annotation + +/** + * Apply to code which exists specifically to easy integration with existing Java and Java APIs. + * + * The goal is to prevent usage from Kotlin when a more idiomatic alternative is available. + */ +@RequiresOptIn("This is a a property, function or class specifically supporting Java " + + "interoperability. Usage from Kotlin should be limited to interactions with Java.") +annotation class JavaInterop |