Skip to content

Commit

Permalink
[J2KT] Add InterfaceWithConstantAndNonConstant class to j2ktnotpassin…
Browse files Browse the repository at this point in the history
…g readable.

PiperOrigin-RevId: 580611506
  • Loading branch information
Googler authored and copybara-github committed Nov 8, 2023
1 parent aa08e8a commit 2116867
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2023 Google Inc.
*
* 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
*
* https://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 j2ktnotpassing;

public interface InterfaceWithConstants {
String compileTimeConstant = "constant";
Object nonCompileTimeConstant = "non-constant";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Generated by J2KT from "j2ktnotpassing/InterfaceWithConstants.java"

#import <Foundation/NSObjCRuntime.h>

@class J2ktJ2ktnotpassingInterfaceWithConstantsCompanion;
@class NSString;

@protocol J2ktJ2ktnotpassingInterfaceWithConstants;

NS_ASSUME_NONNULL_BEGIN

#define J2ktnotpassingInterfaceWithConstants J2ktJ2ktnotpassingInterfaceWithConstants

@compatibility_alias J2ktnotpassingInterfaceWithConstantsCompanion J2ktJ2ktnotpassingInterfaceWithConstantsCompanion;

NS_INLINE NSString* J2ktnotpassingInterfaceWithConstants_get_compileTimeConstant(void) {
return J2ktJ2ktnotpassingInterfaceWithConstantsCompanion.shared.compileTimeConstant_;
}

NS_INLINE id _Nullable J2ktnotpassingInterfaceWithConstants_get_nonCompileTimeConstant(void) {
return J2ktJ2ktnotpassingInterfaceWithConstantsCompanion.shared.nonCompileTimeConstant_;
}

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Generated from "j2ktnotpassing/InterfaceWithConstants.java"
@file:OptIn(ExperimentalObjCName::class)
@file:Suppress(
"ALWAYS_NULL",
"PARAMETER_NAME_CHANGED_ON_OVERRIDE",
"REPEATED_BOUND",
"SENSELESS_COMPARISON",
"UNCHECKED_CAST",
"UNNECESSARY_LATEINIT",
"UNNECESSARY_NOT_NULL_ASSERTION",
"UNREACHABLE_CODE",
"UNUSED_PARAMETER",
"UNUSED_VARIABLE",
"USELESS_CAST",
"VARIABLE_IN_SINGLETON_WITHOUT_THREAD_LOCAL",
"VARIABLE_WITH_REDUNDANT_INITIALIZER")

package j2ktnotpassing

import javaemul.lang.*
import kotlin.Any
import kotlin.OptIn
import kotlin.String
import kotlin.Suppress
import kotlin.experimental.ExperimentalObjCName
import kotlin.jvm.JvmField
import kotlin.native.ObjCName

@ObjCName("J2ktJ2ktnotpassingInterfaceWithConstants", exact = true)
interface InterfaceWithConstants {
@ObjCName("J2ktJ2ktnotpassingInterfaceWithConstantsCompanion", exact = true)
companion object {
@ObjCName("compileTimeConstant_")
const val compileTimeConstant: String = "constant"

@JvmField
@ObjCName("nonCompileTimeConstant_")
val nonCompileTimeConstant: Any? = "non-constant"
}
}

0 comments on commit 2116867

Please sign in to comment.