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

com.jetbrains.pluginverifier.usages.internal.InternalApiUsageProcessor.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-2024 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.internal

import com.jetbrains.pluginverifier.results.location.Location
import com.jetbrains.pluginverifier.verifiers.PluginVerificationContext
import com.jetbrains.pluginverifier.verifiers.VerificationContext
import com.jetbrains.pluginverifier.verifiers.resolution.ClassFileMember

class InternalApiUsageProcessor(pluginVerificationContext: PluginVerificationContext) : BaseInternalApiUsageProcessor(
  AnnotatedInternalApiUsageRegistrar(pluginVerificationContext)
) {

  override fun isInternal(
    resolvedMember: ClassFileMember,
    context: VerificationContext,
    usageLocation: Location
  ): Boolean = resolvedMember.isInternalApi(context.classResolver, usageLocation)
    && resolvedMember.containingClassFile.classFileOrigin != usageLocation.containingClass.classFileOrigin
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy