Move type enhancement state stuff into core:descriptors.jvm
This commit is contained in:
@@ -6,6 +6,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
api(project(":core:descriptors.jvm"))
|
||||||
api(project(":compiler:frontend.common"))
|
api(project(":compiler:frontend.common"))
|
||||||
api(project(":compiler:fir:cones"))
|
api(project(":compiler:fir:cones"))
|
||||||
|
|
||||||
|
|||||||
-1
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendOutputArtifact
|
|||||||
import org.jetbrains.kotlin.test.model.TestModule
|
import org.jetbrains.kotlin.test.model.TestModule
|
||||||
import org.jetbrains.kotlin.test.services.TestServices
|
import org.jetbrains.kotlin.test.services.TestServices
|
||||||
import org.jetbrains.kotlin.test.services.globalMetadataInfoHandler
|
import org.jetbrains.kotlin.test.services.globalMetadataInfoHandler
|
||||||
import org.jetbrains.kotlin.load.java.getReportLevelForAnnotation
|
|
||||||
|
|
||||||
// Not that this diagnostic handler should be included only with `ClassicDiagnosticsHandler` and go after it
|
// Not that this diagnostic handler should be included only with `ClassicDiagnosticsHandler` and go after it
|
||||||
class JspecifyDiagnosticComplianceHandler(testServices: TestServices) : ClassicFrontendAnalysisHandler(testServices) {
|
class JspecifyDiagnosticComplianceHandler(testServices: TestServices) : ClassicFrontendAnalysisHandler(testServices) {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.load.java
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.name.FqName
|
||||||
|
|
||||||
|
class JavaTypeEnhancementState(
|
||||||
|
val jsr305: Jsr305Settings = Jsr305Settings.DEFAULT,
|
||||||
|
val getReportLevelForAnnotation: (FqName) -> ReportLevel = ::getDefaultReportLevelForAnnotation
|
||||||
|
) {
|
||||||
|
val disabledDefaultAnnotations = jsr305.isDisabled || getReportLevelForAnnotation(JSPECIFY_ANNOTATIONS_PACKAGE) == ReportLevel.IGNORE
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val DEFAULT = JavaTypeEnhancementState()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2017 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.load.java
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.name.FqName
|
|
||||||
|
|
||||||
class JavaTypeEnhancementState(
|
|
||||||
val jsr305: Jsr305Settings = Jsr305Settings.DEFAULT,
|
|
||||||
val getReportLevelForAnnotation: (FqName) -> ReportLevel = ::getDefaultReportLevelForAnnotation
|
|
||||||
) {
|
|
||||||
val disabledDefaultAnnotations = jsr305.isDisabled || getReportLevelForAnnotation(JSPECIFY_ANNOTATIONS_PACKAGE) == ReportLevel.IGNORE
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
val DEFAULT = JavaTypeEnhancementState()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user