io.shiftleft.codepropertygraph.generated.nodes.Call.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepropertygraph-domain-classes_3 Show documentation
Show all versions of codepropertygraph-domain-classes_3 Show documentation
codepropertygraph-domain-classes
The newest version!
package io.shiftleft.codepropertygraph.generated.nodes
import io.shiftleft.codepropertygraph.generated.language.*
import scala.collection.immutable.{IndexedSeq, ArraySeq}
import scala.collection.mutable
/** Node base type for compiletime-only checks to improve type safety. EMT stands for: "erased marker trait", i.e. it is
* erased at runtime
*/
trait CallEMT
extends AnyRef
with CallReprEMT
with ExpressionEMT
with HasDispatchTypeEMT
with HasDynamicTypeHintFullNameEMT
with HasMethodFullNameEMT
with HasPossibleTypesEMT
with HasTypeFullNameEMT
trait CallBase extends AbstractNode with CallReprBase with ExpressionBase with StaticType[CallEMT] {
override def propertiesMap: java.util.Map[String, Any] = {
import io.shiftleft.codepropertygraph.generated.accessors.languagebootstrap.*
val res = new java.util.HashMap[String, Any]()
if ((-1: Int) != this.argumentIndex) res.put("ARGUMENT_INDEX", this.argumentIndex)
this.argumentName.foreach { p => res.put("ARGUMENT_NAME", p) }
if (("": String) != this.code) res.put("CODE", this.code)
this.columnNumber.foreach { p => res.put("COLUMN_NUMBER", p) }
if (("": String) != this.dispatchType) res.put("DISPATCH_TYPE", this.dispatchType)
val tmpDynamicTypeHintFullName = this.dynamicTypeHintFullName;
if (tmpDynamicTypeHintFullName.nonEmpty) res.put("DYNAMIC_TYPE_HINT_FULL_NAME", tmpDynamicTypeHintFullName)
this.lineNumber.foreach { p => res.put("LINE_NUMBER", p) }
if (("": String) != this.methodFullName) res.put("METHOD_FULL_NAME", this.methodFullName)
if (("": String) != this.name) res.put("NAME", this.name)
if ((-1: Int) != this.order) res.put("ORDER", this.order)
val tmpPossibleTypes = this.possibleTypes;
if (tmpPossibleTypes.nonEmpty) res.put("POSSIBLE_TYPES", tmpPossibleTypes)
if (("": String) != this.signature) res.put("SIGNATURE", this.signature)
if (("": String) != this.typeFullName) res.put("TYPE_FULL_NAME", this.typeFullName)
res
}
}
object Call {
val Label = "CALL"
object PropertyNames {
/** AST-children of CALL nodes have an argument index, that is used to match call-site arguments with callee
* parameters. Explicit parameters are numbered from 1 to N, while index 0 is reserved for implicit self / this
* parameter. CALLs without implicit parameter therefore have arguments starting with index 1. AST-children of
* BLOCK nodes may have an argument index as well; in this case, the last argument index determines the return
* expression of a BLOCK expression. If the `PARAMETER_NAME` field is set, then the `ARGUMENT_INDEX` field is
* ignored. It is suggested to set it to -1.
*/
val ArgumentIndex = "ARGUMENT_INDEX"
/** For calls involving named parameters, the `ARGUMENT_NAME` field holds the name of the parameter initialized by
* the expression. For all other calls, this field is unset.
*/
val ArgumentName = "ARGUMENT_NAME"
/** This field holds the code snippet that the node represents. */
val Code = "CODE"
/** This optional fields provides the column number of the program construct represented by the node.
*/
val ColumnNumber = "COLUMN_NUMBER"
/** This field holds the dispatch type of a call, which is either `STATIC_DISPATCH` or `DYNAMIC_DISPATCH`. For
* statically dispatched method calls, the call target is known at compile time while for dynamically dispatched
* calls, it can only be determined at runtime as it may depend on the type of an object (as is the case for
* virtual method calls) or calculation of an offset.
*/
val DispatchType = "DISPATCH_TYPE"
/** Type hint for the dynamic type. These are observed to be verifiable at runtime. */
val DynamicTypeHintFullName = "DYNAMIC_TYPE_HINT_FULL_NAME"
/** This optional field provides the line number of the program construct represented by the node.
*/
val LineNumber = "LINE_NUMBER"
/** The FULL_NAME of a method. Used to link CALL and METHOD nodes. It is required to have exactly one METHOD node
* for each METHOD_FULL_NAME
*/
val MethodFullName = "METHOD_FULL_NAME"
/** Name of represented object, e.g., method name (e.g. "run") */
val Name = "NAME"
/** This integer indicates the position of the node among its siblings in the AST. The left-most child has an order
* of 0.
*/
val Order = "ORDER"
/** Similar to `DYNAMIC_TYPE_HINT_FULL_NAME`, but that this makes no guarantee that types within this property are
* correct. This property is used to capture observations between node interactions during a 'may-analysis'.
*/
val PossibleTypes = "POSSIBLE_TYPES"
/** The method signature encodes the types of parameters in a string. The string SHOULD be human readable and
* suitable for differentiating methods with different parameter types sufficiently to allow for resolving of
* function overloading. The present specification does not enforce a strict format for the signature, that is, it
* can be chosen by the frontend implementor to fit the source language.
*/
val Signature = "SIGNATURE"
/** This field contains the fully-qualified static type name of the program construct represented by a node. It is
* the name of an instantiated type, e.g., `java.util.List`, rather than `java.util.List[T]`. If the type
* cannot be determined, this field should be set to the empty string.
*/
val TypeFullName = "TYPE_FULL_NAME"
}
object Properties {
/** AST-children of CALL nodes have an argument index, that is used to match call-site arguments with callee
* parameters. Explicit parameters are numbered from 1 to N, while index 0 is reserved for implicit self / this
* parameter. CALLs without implicit parameter therefore have arguments starting with index 1. AST-children of
* BLOCK nodes may have an argument index as well; in this case, the last argument index determines the return
* expression of a BLOCK expression. If the `PARAMETER_NAME` field is set, then the `ARGUMENT_INDEX` field is
* ignored. It is suggested to set it to -1.
*/
val ArgumentIndex = flatgraph.SinglePropertyKey[Int](kind = 1, name = "ARGUMENT_INDEX", default = -1: Int)
/** For calls involving named parameters, the `ARGUMENT_NAME` field holds the name of the parameter initialized by
* the expression. For all other calls, this field is unset.
*/
val ArgumentName = flatgraph.OptionalPropertyKey[String](kind = 2, name = "ARGUMENT_NAME")
/** This field holds the code snippet that the node represents. */
val Code = flatgraph.SinglePropertyKey[String](kind = 10, name = "CODE", default = "")
/** This optional fields provides the column number of the program construct represented by the node.
*/
val ColumnNumber = flatgraph.OptionalPropertyKey[Int](kind = 11, name = "COLUMN_NUMBER")
/** This field holds the dispatch type of a call, which is either `STATIC_DISPATCH` or `DYNAMIC_DISPATCH`. For
* statically dispatched method calls, the call target is known at compile time while for dynamically dispatched
* calls, it can only be determined at runtime as it may depend on the type of an object (as is the case for
* virtual method calls) or calculation of an offset.
*/
val DispatchType = flatgraph.SinglePropertyKey[String](kind = 17, name = "DISPATCH_TYPE", default = "")
/** Type hint for the dynamic type. These are observed to be verifiable at runtime. */
val DynamicTypeHintFullName = flatgraph.MultiPropertyKey[String](kind = 18, name = "DYNAMIC_TYPE_HINT_FULL_NAME")
/** This optional field provides the line number of the program construct represented by the node.
*/
val LineNumber = flatgraph.OptionalPropertyKey[Int](kind = 34, name = "LINE_NUMBER")
/** The FULL_NAME of a method. Used to link CALL and METHOD nodes. It is required to have exactly one METHOD node
* for each METHOD_FULL_NAME
*/
val MethodFullName = flatgraph.SinglePropertyKey[String](kind = 36, name = "METHOD_FULL_NAME", default = "")
/** Name of represented object, e.g., method name (e.g. "run") */
val Name = flatgraph.SinglePropertyKey[String](kind = 39, name = "NAME", default = "")
/** This integer indicates the position of the node among its siblings in the AST. The left-most child has an order
* of 0.
*/
val Order = flatgraph.SinglePropertyKey[Int](kind = 43, name = "ORDER", default = -1: Int)
/** Similar to `DYNAMIC_TYPE_HINT_FULL_NAME`, but that this makes no guarantee that types within this property are
* correct. This property is used to capture observations between node interactions during a 'may-analysis'.
*/
val PossibleTypes = flatgraph.MultiPropertyKey[String](kind = 47, name = "POSSIBLE_TYPES")
/** The method signature encodes the types of parameters in a string. The string SHOULD be human readable and
* suitable for differentiating methods with different parameter types sufficiently to allow for resolving of
* function overloading. The present specification does not enforce a strict format for the signature, that is, it
* can be chosen by the frontend implementor to fit the source language.
*/
val Signature = flatgraph.SinglePropertyKey[String](kind = 49, name = "SIGNATURE", default = "")
/** This field contains the fully-qualified static type name of the program construct represented by a node. It is
* the name of an instantiated type, e.g., `java.util.List`, rather than `java.util.List[T]`. If the type
* cannot be determined, this field should be set to the empty string.
*/
val TypeFullName = flatgraph.SinglePropertyKey[String](kind = 52, name = "TYPE_FULL_NAME", default = "")
}
object PropertyDefaults {
val ArgumentIndex = -1: Int
val Code = ""
val DispatchType = ""
val MethodFullName = ""
val Name = ""
val Order = -1: Int
val Signature = ""
val TypeFullName = ""
}
}
class Call(graph_4762: flatgraph.Graph, seq_4762: Int)
extends StoredNode(graph_4762, 7.toShort, seq_4762)
with CallBase
with CallRepr
with Expression
with StaticType[CallEMT] {
override def productElementName(n: Int): String =
n match {
case 0 => "argumentIndex"
case 1 => "argumentName"
case 2 => "code"
case 3 => "columnNumber"
case 4 => "dispatchType"
case 5 => "dynamicTypeHintFullName"
case 6 => "lineNumber"
case 7 => "methodFullName"
case 8 => "name"
case 9 => "order"
case 10 => "possibleTypes"
case 11 => "signature"
case 12 => "typeFullName"
case _ => ""
}
override def productElement(n: Int): Any =
n match {
case 0 => this.argumentIndex
case 1 => this.argumentName
case 2 => this.code
case 3 => this.columnNumber
case 4 => this.dispatchType
case 5 => this.dynamicTypeHintFullName
case 6 => this.lineNumber
case 7 => this.methodFullName
case 8 => this.name
case 9 => this.order
case 10 => this.possibleTypes
case 11 => this.signature
case 12 => this.typeFullName
case _ => null
}
override def productPrefix = "Call"
override def productArity = 13
override def canEqual(that: Any): Boolean = that != null && that.isInstanceOf[Call]
}
object NewCall {
def apply(): NewCall = new NewCall
private val outNeighbors: Map[String, Set[String]] = Map(
"ALIAS_OF" -> Set("TYPE"),
"ARGUMENT" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"AST" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"BINDS" -> Set("BINDING"),
"BINDS_TO" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CALL" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CAPTURE" -> Set("CLOSURE_BINDING"),
"CAPTURED_BY" -> Set("CLOSURE_BINDING"),
"CDG" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CFG" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CONDITION" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CONTAINS" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"DOMINATE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"EVAL_TYPE" -> Set("TYPE"),
"IMPORTS" -> Set("DEPENDENCY"),
"INHERITS_FROM" -> Set("TYPE"),
"IS_CALL_FOR_IMPORT" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"PARAMETER_LINK" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"POST_DOMINATE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"REACHING_DEF" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"RECEIVER" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"REF" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"SOURCE_FILE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"TAGGED_BY" -> Set("TAG")
)
private val inNeighbors: Map[String, Set[String]] = Map(
"ARGUMENT" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"AST" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"BINDS_TO" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CALL" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CDG" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CFG" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CONDITION" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"CONTAINS" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"DOMINATE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"IS_CALL_FOR_IMPORT" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"PARAMETER_LINK" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"POST_DOMINATE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"REACHING_DEF" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"RECEIVER" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"REF" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BINDING",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"CLOSURE_BINDING",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
),
"SOURCE_FILE" -> Set(
"ANNOTATION",
"ANNOTATION_LITERAL",
"ANNOTATION_PARAMETER",
"ANNOTATION_PARAMETER_ASSIGN",
"ARRAY_INITIALIZER",
"BLOCK",
"CALL",
"CALL_REPR",
"CFG_NODE",
"COMMENT",
"CONTROL_STRUCTURE",
"EXPRESSION",
"FIELD_IDENTIFIER",
"FILE",
"IDENTIFIER",
"IMPORT",
"JUMP_LABEL",
"JUMP_TARGET",
"LITERAL",
"LOCAL",
"MEMBER",
"METHOD",
"METHOD_PARAMETER_IN",
"METHOD_PARAMETER_OUT",
"METHOD_REF",
"METHOD_RETURN",
"MODIFIER",
"NAMESPACE",
"NAMESPACE_BLOCK",
"RETURN",
"TEMPLATE_DOM",
"TYPE_ARGUMENT",
"TYPE_DECL",
"TYPE_PARAMETER",
"TYPE_REF",
"UNKNOWN"
)
)
object InsertionHelpers {
object NewNodeInserter_Call_argumentIndex extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[Int]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.argumentIndex
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_argumentName extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
generated.argumentName match {
case Some(item) =>
dstCast(offset) = item
offset += 1
case _ =>
}
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_code extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.code
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_columnNumber extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[Int]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
generated.columnNumber match {
case Some(item) =>
dstCast(offset) = item
offset += 1
case _ =>
}
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_dispatchType extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.dispatchType
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_dynamicTypeHintFullName extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
for (item <- generated.dynamicTypeHintFullName) {
dstCast(offset) = item
offset += 1
}
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_lineNumber extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[Int]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
generated.lineNumber match {
case Some(item) =>
dstCast(offset) = item
offset += 1
case _ =>
}
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_methodFullName extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.methodFullName
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_name extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.name
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_order extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[Int]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.order
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_possibleTypes extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
for (item <- generated.possibleTypes) {
dstCast(offset) = item
offset += 1
}
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_signature extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.signature
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
object NewNodeInserter_Call_typeFullName extends flatgraph.NewNodePropertyInsertionHelper {
override def insertNewNodeProperties(
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
dst: AnyRef,
offsets: Array[Int]
): Unit = {
if (newNodes.isEmpty) return
val dstCast = dst.asInstanceOf[Array[String]]
val seq = newNodes.head.storedRef.get.seq()
var offset = offsets(seq)
var idx = 0
while (idx < newNodes.length) {
val nn = newNodes(idx)
nn match {
case generated: NewCall =>
dstCast(offset) = generated.typeFullName
offset += 1
case _ =>
}
assert(seq + idx == nn.storedRef.get.seq(), "internal consistency check")
idx += 1
offsets(idx + seq) = offset
}
}
}
}
}
class NewCall extends NewNode(7.toShort) with CallBase with CallReprNew with ExpressionNew {
override type StoredNodeType = Call
override def label: String = "CALL"
override def isValidOutNeighbor(edgeLabel: String, n: NewNode): Boolean = {
NewCall.outNeighbors.getOrElse(edgeLabel, Set.empty).contains(n.label)
}
override def isValidInNeighbor(edgeLabel: String, n: NewNode): Boolean = {
NewCall.inNeighbors.getOrElse(edgeLabel, Set.empty).contains(n.label)
}
var argumentIndex: Int = -1: Int
var argumentName: Option[String] = None
var code: String = "": String
var columnNumber: Option[Int] = None
var dispatchType: String = "": String
var dynamicTypeHintFullName: IndexedSeq[String] = ArraySeq.empty
var lineNumber: Option[Int] = None
var methodFullName: String = "": String
var name: String = "": String
var order: Int = -1: Int
var possibleTypes: IndexedSeq[String] = ArraySeq.empty
var signature: String = "": String
var typeFullName: String = "": String
def argumentIndex(value: Int): this.type = { this.argumentIndex = value; this }
def argumentName(value: Option[String]): this.type = { this.argumentName = value; this }
def argumentName(value: String): this.type = { this.argumentName = Option(value); this }
def code(value: String): this.type = { this.code = value; this }
def columnNumber(value: Int): this.type = { this.columnNumber = Option(value); this }
def columnNumber(value: Option[Int]): this.type = { this.columnNumber = value; this }
def dispatchType(value: String): this.type = { this.dispatchType = value; this }
def dynamicTypeHintFullName(value: IterableOnce[String]): this.type = {
this.dynamicTypeHintFullName = value.iterator.to(ArraySeq); this
}
def lineNumber(value: Int): this.type = { this.lineNumber = Option(value); this }
def lineNumber(value: Option[Int]): this.type = { this.lineNumber = value; this }
def methodFullName(value: String): this.type = { this.methodFullName = value; this }
def name(value: String): this.type = { this.name = value; this }
def order(value: Int): this.type = { this.order = value; this }
def possibleTypes(value: IterableOnce[String]): this.type = { this.possibleTypes = value.iterator.to(ArraySeq); this }
def signature(value: String): this.type = { this.signature = value; this }
def typeFullName(value: String): this.type = { this.typeFullName = value; this }
override def countAndVisitProperties(interface: flatgraph.BatchedUpdateInterface): Unit = {
interface.countProperty(this, 1, 1)
interface.countProperty(this, 2, argumentName.size)
interface.countProperty(this, 10, 1)
interface.countProperty(this, 11, columnNumber.size)
interface.countProperty(this, 17, 1)
interface.countProperty(this, 18, dynamicTypeHintFullName.size)
interface.countProperty(this, 34, lineNumber.size)
interface.countProperty(this, 36, 1)
interface.countProperty(this, 39, 1)
interface.countProperty(this, 43, 1)
interface.countProperty(this, 47, possibleTypes.size)
interface.countProperty(this, 49, 1)
interface.countProperty(this, 52, 1)
}
override def copy: this.type = {
val newInstance = new NewCall
newInstance.argumentIndex = this.argumentIndex
newInstance.argumentName = this.argumentName
newInstance.code = this.code
newInstance.columnNumber = this.columnNumber
newInstance.dispatchType = this.dispatchType
newInstance.dynamicTypeHintFullName = this.dynamicTypeHintFullName
newInstance.lineNumber = this.lineNumber
newInstance.methodFullName = this.methodFullName
newInstance.name = this.name
newInstance.order = this.order
newInstance.possibleTypes = this.possibleTypes
newInstance.signature = this.signature
newInstance.typeFullName = this.typeFullName
newInstance.asInstanceOf[this.type]
}
override def productElementName(n: Int): String =
n match {
case 0 => "argumentIndex"
case 1 => "argumentName"
case 2 => "code"
case 3 => "columnNumber"
case 4 => "dispatchType"
case 5 => "dynamicTypeHintFullName"
case 6 => "lineNumber"
case 7 => "methodFullName"
case 8 => "name"
case 9 => "order"
case 10 => "possibleTypes"
case 11 => "signature"
case 12 => "typeFullName"
case _ => ""
}
override def productElement(n: Int): Any =
n match {
case 0 => this.argumentIndex
case 1 => this.argumentName
case 2 => this.code
case 3 => this.columnNumber
case 4 => this.dispatchType
case 5 => this.dynamicTypeHintFullName
case 6 => this.lineNumber
case 7 => this.methodFullName
case 8 => this.name
case 9 => this.order
case 10 => this.possibleTypes
case 11 => this.signature
case 12 => this.typeFullName
case _ => null
}
override def productPrefix = "NewCall"
override def productArity = 13
override def canEqual(that: Any): Boolean = that != null && that.isInstanceOf[NewCall]
}