Package-level declarations

Types

Link copied to clipboard

The declaration of a constructor within a RecordDeclaration. Is it essentially a special case of a MethodDeclaration.

Link copied to clipboard
abstract class Declaration : Node

Represents a single declaration or definition, i.e. of a variable (VariableDeclaration) or function (FunctionDeclaration).

Link copied to clipboard

This represents a sequence of one or more declaration(s). The purpose of this node is primarily to bridge between a single declaration and a list of declarations in the front-end handlers. It will be converted into a list-structure and all its children will be added to the parent, i.e. the translation unit. It should NOT end up in the final graph.

Link copied to clipboard

Represents a constant within an EnumDeclaration. Depending on the language, this might have an explicit initializer value.

Link copied to clipboard
Link copied to clipboard

Declaration of a field within a RecordDeclaration. It contains the modifiers associated with the field as well as an initializer Expression which provides an initial value for the field.

Link copied to clipboard

Represents the declaration or definition of a function.

Link copied to clipboard

Node representing a declaration of a FunctionTemplate

Link copied to clipboard

This class represents a real import of one or more symbols of a specified NameScope (e.g., defined by a NamespaceDeclaration) into the current scope. Depending on the language, this can be only used at the global or package scope (e.g. in Go and Java with the import keyword) or in any scope (e.g. in C++ with the using keyword).

Link copied to clipboard

This declaration represents either an include or an import, depending on the language.

Link copied to clipboard

A method declaration is a FunctionDeclaration that is part of to a specific RecordDeclaration .

Link copied to clipboard

Declares the scope of a namespace and appends its own name to the current namespace-prefix to form a new namespace prefix. While RecordDeclarations in C++ and Java have their own namespace, namespace declarations can be declared multiple times. At the beginning of a Java-file, a namespace declaration is used to represent the package name as namespace. In its explicit appearance a namespace declaration can contain FunctionDeclaration and RecordDeclaration similar to a RecordDeclaration and the semantic difference between NamespaceDeclaration and RecordDeclaration lies in the non-instantiability of a namespace.

Link copied to clipboard

Some languages allow to either overload operators or to add custom operators to classes (see HasOperatorOverloading). In both cases, this special function class denotes that this handles this particular operator call.

Link copied to clipboard

A declaration of a function or nontype template parameter.

Link copied to clipboard
class ProblemDeclaration(var problem: String = "", var problemType: ProblemNode.ProblemType = ProblemNode.ProblemType.TRANSLATION) : ValueDeclaration, ProblemNode

A node where the statement could not be translated by the graph. We use ProblemExpressions whenever the CPG library requires an Declaration.

Link copied to clipboard

Represents a C++ union/struct/class or Java class

Link copied to clipboard

Node representing a declaration of a template class or struct

Link copied to clipboard

Abstract class representing the template concept

Link copied to clipboard

The top most declaration, representing a translation unit, for example a file.

Link copied to clipboard

This declaration models a tuple of different VariableDeclaration nodes. This is primarily used in languages that support multiple assignments in a declaration, such as Go. The tuple is needed because the initializer of this declaration is flowing into the tuple (and then split among its elements) rather than flowing into the declarations individually. For example the following code

Link copied to clipboard

Represents a type alias definition as found in C/C++: typedef unsigned long ulong;

Link copied to clipboard

A declaration of a type template parameter

Link copied to clipboard

A declaration who has a type.

Link copied to clipboard

Represents the declaration of a local variable.

Properties

Link copied to clipboard

This is a very basic implementation of Cyclomatic Complexity.