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

io.shiftleft.semanticcpg.accesspath.TrackedBase.scala Maven / Gradle / Ivy

There is a newer version: 4.0.131
Show newest version
package io.shiftleft.semanticcpg.accesspath

import io.shiftleft.codepropertygraph.generated.nodes.*
import io.shiftleft.semanticcpg.language.*

trait TrackedBase
case class TrackedNamedVariable(name: String) extends TrackedBase
case class TrackedReturnValue(call: CallRepr) extends TrackedBase {
  override def toString: String = {
    s"TrackedReturnValue(${call.code})"
  }
}
case class TrackedLiteral(literal: Literal) extends TrackedBase {
  override def toString: String = {
    s"TrackedLiteral(${literal.code})"
  }
}

sealed trait TrackedMethodOrTypeRef extends TrackedBase {
  def code: String

  override def toString: String = {
    s"TrackedMethodOrTypeRef($code)"
  }
}

case class TrackedMethod(method: MethodRef) extends TrackedMethodOrTypeRef {
  override def code: String = method.code
}
case class TrackedTypeRef(typeRef: TypeRef) extends TrackedMethodOrTypeRef {
  override def code: String = typeRef.code
}

case class TrackedAlias(argIndex: Int) extends TrackedBase {
  override def toString: String = {
    s"TrackedAlias($argIndex)"
  }
}

object TrackedUnknown extends TrackedBase {
  override def toString: String = {
    "TrackedUnknown"
  }
}
object TrackedFormalReturn extends TrackedBase {
  override def toString: String = {
    "TrackedFormalReturn"
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy