Minor, convert CommonConfigurationKeys to Kotlin
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* 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 org.jetbrains.kotlin.config;
|
||||
|
||||
public class CommonConfigurationKeys {
|
||||
private CommonConfigurationKeys() {
|
||||
}
|
||||
|
||||
public static final CompilerConfigurationKey<LanguageVersionSettings> LANGUAGE_VERSION_SETTINGS =
|
||||
CompilerConfigurationKey.create("language version settings");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> SKIP_METADATA_VERSION_CHECK =
|
||||
CompilerConfigurationKey.create("skip metadata version check");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> DISABLE_INLINE =
|
||||
CompilerConfigurationKey.create("disable inline");
|
||||
|
||||
public static final CompilerConfigurationKey<String> MODULE_NAME =
|
||||
CompilerConfigurationKey.create("module name");
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* 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 org.jetbrains.kotlin.config
|
||||
|
||||
object CommonConfigurationKeys {
|
||||
@JvmField
|
||||
val LANGUAGE_VERSION_SETTINGS = CompilerConfigurationKey<LanguageVersionSettings>("language version settings")
|
||||
|
||||
@JvmField
|
||||
val SKIP_METADATA_VERSION_CHECK = CompilerConfigurationKey<Boolean>("skip metadata version check")
|
||||
|
||||
@JvmField
|
||||
val DISABLE_INLINE = CompilerConfigurationKey<Boolean>("disable inline")
|
||||
|
||||
@JvmField
|
||||
val MODULE_NAME = CompilerConfigurationKey<String>("module name")
|
||||
}
|
||||
@@ -23,10 +23,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class CompilerConfigurationKey<T> {
|
||||
Key<T> ideaKey;
|
||||
|
||||
private CompilerConfigurationKey(@NotNull @NonNls String name) {
|
||||
public CompilerConfigurationKey(@NotNull @NonNls String name) {
|
||||
ideaKey = Key.create(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static <T> CompilerConfigurationKey<T> create(@NotNull @NonNls String name) {
|
||||
return new CompilerConfigurationKey<T>(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user