From 1bcaad5cd71f751fbd3678f6722eb96ab069bae6 Mon Sep 17 00:00:00 2001 From: Wei Jun Kong Date: Thu, 21 May 2026 13:36:55 -0700 Subject: [PATCH] BEGIN_PUBLIC changes END_PUBLIC PiperOrigin-RevId: 919229129 --- .../annotations/ObjectiveCTypeName.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 annotations/src/main/java/com/google/j2objc/annotations/ObjectiveCTypeName.java diff --git a/annotations/src/main/java/com/google/j2objc/annotations/ObjectiveCTypeName.java b/annotations/src/main/java/com/google/j2objc/annotations/ObjectiveCTypeName.java new file mode 100644 index 0000000000..49fb9a2ce3 --- /dev/null +++ b/annotations/src/main/java/com/google/j2objc/annotations/ObjectiveCTypeName.java @@ -0,0 +1,40 @@ +/* + * 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.google.j2objc.annotations; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation that specifies what the Objective-C class or protocol declaration should be when + * translated. + * + *

For classes specify the desired Objective-C class name for the translated type. + */ +@Documented +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.CLASS) +public @interface ObjectiveCTypeName { + + /** + * The Objective-C name to use for this type. + * + * @return the Objective-C name. + */ + String value(); +}