All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jetbrains.pluginverifier.usages.deprecated.DeprecatedMethodOverridingProcessor.kt Maven / Gradle / Ivy

Go to download

JetBrains Plugin Verifier Classes for IntelliJ Platform integration with API usage detection and reporting.

The newest version!
/*
 * Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 */

package com.jetbrains.pluginverifier.usages.deprecated

import com.jetbrains.pluginverifier.verifiers.VerificationContext
import com.jetbrains.pluginverifier.verifiers.method.MethodOverridingProcessor
import com.jetbrains.pluginverifier.verifiers.resolution.Method

class DeprecatedMethodOverridingProcessor(private val deprecatedApiRegistrar: DeprecatedApiRegistrar) : MethodOverridingProcessor {
  override fun processMethodOverriding(method: Method, overriddenMethod: Method, context: VerificationContext) {
    val methodDeprecated = overriddenMethod.deprecationInfo
    if (methodDeprecated != null) {
      deprecatedApiRegistrar.registerDeprecatedUsage(
        DeprecatedMethodOverridden(
          overriddenMethod.location,
          method.location,
          methodDeprecated
        )
      )
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy