CSharpScope

io.joern.csharpsrc2cpg.datastructures.CSharpScope
class CSharpScope(typeMap: TypeMap) extends Scope[String, DeclarationNew, ScopeType]

Attributes

Graph
Supertypes
class Scope[String, DeclarationNew, ScopeType]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addImport(namespace: String): Unit

Appends known types imported from a using statement into the scope.

Appends known types imported from a using statement into the scope.

Value parameters

namespace

the fully qualified imported namespace.

Attributes

def findFieldInScope(fieldName: String): Option[FieldDecl]

Works for this.field accesses or .field accesses.

Works for this.field accesses or .field accesses.

Attributes

def isTopLevel: Boolean

Attributes

Returns

true if the scope is currently on the top-level, false if the scope is within some nested scope.

def peekScope(): Option[ScopeType]

Returns the top of the scope, without removing it from the stack.

Returns the top of the scope, without removing it from the stack.

Attributes

override def popScope(): Option[ScopeType]

Pops the scope, removing types from the scope if necessary.

Pops the scope, removing types from the scope if necessary.

Attributes

Definition Classes
Scope
def pushField(field: FieldDecl): Unit
override def pushNewScope(scopeNode: ScopeType): Unit

Pops the scope, adding types from the scope if necessary.

Pops the scope, adding types from the scope if necessary.

Attributes

Definition Classes
Scope
def surroundingScopeFullName: Option[String]

Attributes

Returns

the full name of the surrounding scope.

def surroundingTypeDeclFullName: Option[String]

Attributes

Returns

the surrounding type declaration if one exists.

def tryResolveMethodInvocation(typeFullName: String, callName: String): Option[CSharpMethod]
def tryResolveMethodReturn(typeFullName: String, callName: String): Option[String]
def tryResolveMethodSignature(typeFullName: String, callName: String): Option[String]
def tryResolveTypeReference(typeName: String): Option[String]

Inherited methods

def addToScope(identifier: String, variable: DeclarationNew): S

Attributes

Inherited from:
Scope
def isEmpty: Boolean

Attributes

Inherited from:
Scope
def lookupVariable(identifier: String): Option[V]

Attributes

Inherited from:
Scope
def size: Int

Attributes

Inherited from:
Scope