File

io.shiftleft.codepropertygraph.generated.nodes.File
See theFile companion object
class File(graph_4762: Graph, seq_4762: Int) extends StoredNode, FileBase, AstNode, StaticType[FileEMT]
  • NODE PROPERTIES:

â–¸ Code (String); Cardinality one (mandatory with default value <empty>); This field holds the code snippet that the node represents.

â–¸ ColumnNumber (Int); Cardinality ZeroOrOne (optional); This optional fields provides the column number of the program construct represented by the node.

â–¸ Content (String); Cardinality one (mandatory with default value <empty>); Certain files, e.g., configuration files, may be included in the CPG as-is. For such files, the CONTENT field contains the files content.

â–¸ Hash (String); Cardinality ZeroOrOne (optional); This property contains a hash value in the form of a string. Hashes can be used to summarize data, e.g., to summarize the contents of source files or sub graphs. Such summaries are useful to determine whether code has already been analyzed in incremental analysis pipelines. This property is optional to allow its calculation to be deferred or skipped if the hash is not needed.

â–¸ LineNumber (Int); Cardinality ZeroOrOne (optional); This optional field provides the line number of the program construct represented by the node.

â–¸ Name (String); Cardinality one (mandatory with default value <empty>); Name of represented object, e.g., method name (e.g. "run")

â–¸ Offset (Int); Cardinality ZeroOrOne (optional); Start offset into the CONTENT property of the corresponding FILE node. The offset is such that parts of the content can easily be accessed via content.substring(offset, offsetEnd). This means that the offset must be measured in utf16 encoding (i.e. neither in characters/codeunits nor in byte-offsets into a utf8 encoding). E.g. for METHOD nodes this start offset points to the start of the methods source code in the string holding the source code of the entire file.

â–¸ OffsetEnd (Int); Cardinality ZeroOrOne (optional); End offset (exclusive) into the CONTENT property of the corresponding FILE node. See OFFSET documentation for finer details. E.g. for METHOD nodes this end offset points to the first code position which is not part of the method.

â–¸ Order (Int); Cardinality one (mandatory with default value -1); This integer indicates the position of the node among its siblings in the AST. The left-most child has an order of 0.

Attributes

Companion
object
Graph
Supertypes
trait AstNode
trait FileBase
trait AstNodeBase
class StoredNode
trait AbstractNode
trait Product
trait Equals
class GNode
trait DNodeOrNode
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def canEqual(that: Any): Boolean

Attributes

Definition Classes
Equals
override def productArity: Int

Attributes

Definition Classes
Product
override def productElement(n: Int): Any

Attributes

Definition Classes
Product
override def productElementName(n: Int): String

Attributes

Definition Classes
Product
override def productPrefix: String

Attributes

Definition Classes
Product

Inherited methods

final def _aliasOfIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _aliasOfOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _argumentIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _argumentOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _astIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _astOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _bindsIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _bindsOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _bindsToIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _bindsToOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _callIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _callOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _captureIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _captureOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _capturedByIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _capturedByOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _cdgIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _cdgOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _cfgIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _cfgOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _conditionIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _conditionOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _containsIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _containsOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
def _debugChildren(): Array[<FromJavaObject>]

Attributes

Inherited from:
GNode
final def _dominateIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _dominateOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _evalTypeIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _evalTypeOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _importsIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _importsOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _inheritsFromIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _inheritsFromOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _isCallForImportIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _isCallForImportOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _parameterLinkIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _parameterLinkOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _postDominateIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _postDominateOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _reachingDefIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _reachingDefOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _receiverIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _receiverOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _refIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _refOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _sourceFileIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _sourceFileOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _taggedByIn: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
final def _taggedByOut: Iterator[StoredNode]

Attributes

Inherited from:
StoredNode
def hashCode(): Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Inherited from:
GNode
final def id(): Long

Attributes

Inherited from:
GNode
def label(): String

Attributes

Inherited from:
GNode
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def properties: Map[String, Any]

Attributes

Inherited from:
AbstractNode
override def propertiesMap: Map[String, Any]

TODO deprecate and phase out

TODO deprecate and phase out

Attributes

Definition Classes
Inherited from:
FileBase
final def seq(): Int

Attributes

Inherited from:
GNode
def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Inherited from:
GNode

Inherited fields

final val graph: Graph

Attributes

Inherited from:
GNode
final val nodeKind: Short

Attributes

Inherited from:
GNode