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

com.autonomousapps.model.intermediates.consumer.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.model.intermediates

import com.autonomousapps.model.CodeSource
import com.squareup.moshi.JsonClass

/** A single source file (e.g., `.java`, `.kt`) in this project. */
@JsonClass(generateAdapter = false)
internal data class ExplodingSourceCode(
  val relativePath: String,
  val className: String,
  val kind: CodeSource.Kind,
  val imports: Set
) : Comparable {

  override fun compareTo(other: ExplodingSourceCode): Int = relativePath.compareTo(other.relativePath)
}

@JsonClass(generateAdapter = false)
internal data class ExplodingBytecode(
  val relativePath: String,

  /** The name of this class. */
  val className: String,

  /** The path to the source file for this class. TODO: how does this differ from [relativePath]? */
  val sourceFile: String?,

  /** Every class discovered in the bytecode of [className], and not as an annotation. */
  val nonAnnotationClasses: Set,

  /** Every class discovered in the bytecode of [className], and as a visible annotation. */
  val annotationClasses: Set,

  /** Every class discovered in the bytecode of [className], and as an invisible annotation. */
  val invisibleAnnotationClasses: Set,
)

@JsonClass(generateAdapter = false)
internal data class ExplodingAbi(
  val className: String,
  val sourceFile: String?,
  /** Every class discovered in the bytecode of [className], and which is exposed as part of the ABI. */
  val exposedClasses: Set
) : Comparable {
  override fun compareTo(other: ExplodingAbi): Int = className.compareTo(other.className)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy