class AstCreator extends AstCreatorBase with AstForTypesCreator with AstForFunctionsCreator with AstForPrimitivesCreator with AstForStatementsCreator with AstForExpressionsCreator with AstNodeBuilder with AstCreatorHelper with MacroHandler with x2cpg.AstNodeBuilder[IASTNode, AstCreator]
Translates the Eclipse CDT AST into a CPG AST.
- Alphabetic
- By Inheritance
- AstCreator
- AstNodeBuilder
- MacroHandler
- AstCreatorHelper
- AstNodeBuilder
- AstForExpressionsCreator
- AstForStatementsCreator
- AstForPrimitivesCreator
- AstForFunctionsCreator
- AstForTypesCreator
- AstCreatorBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AstCreator(filename: String, config: Config, cdtAst: IASTTranslationUnit, file2OffsetTable: ConcurrentHashMap[String, Array[Int]])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def absolutePath(filename: String): String
- Definition Classes
- AstCreatorBase
- def annotationAssignmentAst(assignmentValueName: String, code: String, assignmentAst: Ast): Ast
- Definition Classes
- AstCreatorBase
- def annotationAst(annotation: NewAnnotation, children: Seq[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def annotationNode(node: IASTNode, code: String, name: String, fullName: String): NewAnnotation
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def asChildOfMacroCall(node: IASTNode, ast: Ast): Ast
For the given node, determine if it is expanded from a macro, and if so, create a Call node to represent the macro invocation and attach
astas its child.For the given node, determine if it is expanded from a macro, and if so, create a Call node to represent the macro invocation and attach
astas its child.- Definition Classes
- MacroHandler
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def astForASMDeclaration(asm: IASTASMDeclaration): Ast
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astForAliasDeclaration(aliasDeclaration: ICPPASTAliasDeclaration): Ast
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astForArrayModifier(arrMod: IASTArrayModifier): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForBlockStatement(blockStmt: IASTCompoundStatement, order: Int = -1): Ast
- Attributes
- protected
- Definition Classes
- AstForStatementsCreator
- def astForComment(comment: IASTComment): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForDeclarator(declaration: IASTSimpleDeclaration, declarator: IASTDeclarator, index: Int): Ast
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astForExpression(expression: IASTExpression): Ast
- Attributes
- protected
- Definition Classes
- AstForExpressionsCreator
- def astForFieldReference(fieldRef: IASTFieldReference): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForFunctionDeclarator(funcDecl: IASTFunctionDeclarator): Ast
- Attributes
- protected
- Definition Classes
- AstForFunctionsCreator
- def astForFunctionDefinition(funcDef: IASTFunctionDefinition): Ast
- Attributes
- protected
- Definition Classes
- AstForFunctionsCreator
- def astForIdentifier(ident: IASTNode): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForInitializer(declarator: IASTDeclarator, init: IASTInitializer): Ast
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astForInitializerList(l: IASTInitializerList): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForLiteral(lit: IASTLiteralExpression): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForMethodRefForLambda(lambdaExpression: ICPPASTLambdaExpression): Ast
- Attributes
- protected
- Definition Classes
- AstForFunctionsCreator
- def astForNamespaceAlias(namespaceAlias: ICPPASTNamespaceAlias): Ast
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astForNode(node: IASTNode): Ast
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def astForQualifiedName(qualId: CPPASTQualifiedName): Ast
- Attributes
- protected
- Definition Classes
- AstForPrimitivesCreator
- def astForStaticAssert(a: ICPPASTStaticAssertDeclaration): Ast
- Attributes
- protected
- Definition Classes
- AstForExpressionsCreator
- def astsForComments(iASTTranslationUnit: IASTTranslationUnit): Seq[Ast]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def astsForDeclaration(decl: IASTDeclaration): Seq[Ast]
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def astsForStatement(statement: IASTStatement, argIndex: Int = -1): Seq[Ast]
- Attributes
- protected
- Definition Classes
- AstForStatementsCreator
- def attachDependenciesAndImports(iASTTranslationUnit: IASTTranslationUnit): Unit
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def blockAst(blockNode: NewBlock, statements: List[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def blockNode(node: IASTNode, code: String, typeFullName: String): NewBlock
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def blockNode(node: IASTNode): NewBlock
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def callAst(callNode: NewCall, arguments: Seq[Ast], base: Option[Ast], receiver: Option[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def callNode(node: IASTNode, code: String, name: String, methodFullName: String, dispatchType: String, signature: Option[String], typeFullName: Option[String]): NewCall
- Definition Classes
- AstNodeBuilder
- def callNode(node: IASTNode, code: String, name: String, methodFullName: String, dispatchType: String): NewCall
- Definition Classes
- AstNodeBuilder
- val cdtAst: IASTTranslationUnit
- def cleanType(rawType: String, stripKeywords: Boolean = true): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def column(node: IASTNode): Option[Integer]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def columnEnd(node: IASTNode): Option[Integer]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- val config: Config
- def controlStructureAst(controlStructureNode: NewControlStructure, condition: Option[Ast], children: Seq[Ast], placeConditionLast: Boolean): Ast
- Definition Classes
- AstCreatorBase
- def controlStructureNode(node: IASTNode, controlStructureType: String, code: String): NewControlStructure
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def createAst(): DiffGraphBuilder
- Definition Classes
- AstCreator → AstCreatorBase
- def dereferenceTypeFullName(fullName: String): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- val diffGraph: DiffGraphBuilder
- Definition Classes
- AstCreatorBase
- def doWhileAst(condition: Option[Ast], body: Seq[Ast], code: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast
- Definition Classes
- AstCreatorBase
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fieldIdentifierNode(node: IASTNode, name: String, code: String): NewFieldIdentifier
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- val file2OffsetTable: ConcurrentHashMap[String, Array[Int]]
- def fileName(node: IASTNode): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- val filename: String
- def fixQualifiedName(name: String): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def forAst(forNode: NewControlStructure, locals: Seq[Ast], initAsts: Seq[Ast], conditionAsts: Seq[Ast], updateAsts: Seq[Ast], bodyAsts: Seq[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def forAst(forNode: NewControlStructure, locals: Seq[Ast], initAsts: Seq[Ast], conditionAsts: Seq[Ast], updateAsts: Seq[Ast], bodyAst: Ast): Ast
- Definition Classes
- AstCreatorBase
- def fullName(node: IASTNode): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def globalNamespaceBlock(): NewNamespaceBlock
- Definition Classes
- AstCreatorBase
- def handleUsingDeclaration(usingDecl: ICPPASTUsingDeclaration): Seq[Ast]
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def identifierNode(node: IASTNode, name: String, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewIdentifier
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def isIncludedNode(node: IASTNode): Boolean
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isQualifiedName(name: String): Boolean
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def lastNameOfQualifiedName(name: String): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def line(node: IASTNode): Option[Integer]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def lineEnd(node: IASTNode): Option[Integer]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def literalNode(node: IASTNode, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewLiteral
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def localNode(node: IASTNode, name: String, code: String, typeFullName: String, closureBindingId: Option[String]): NewLocal
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- val logger: Logger
- Attributes
- protected
- def memberNode(node: IASTNode, name: String, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewMember
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def memberNode(node: IASTNode, name: String, code: String, typeFullName: String): NewMember
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def methodAst(method: NewMethod, parameters: Seq[Ast], body: Ast, methodReturn: NewMethodReturn, modifiers: Seq[NewModifier]): Ast
- Definition Classes
- AstCreatorBase
- val methodAstParentStack: Stack[NewNode]
- Attributes
- protected
- def methodAstWithAnnotations(method: NewMethod, parameters: Seq[Ast], body: Ast, methodReturn: NewMethodReturn, modifiers: Seq[NewModifier], annotations: Seq[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def methodNode(node: IASTNode, name: String, code: String, fullName: String, signature: Option[String], fileName: String, astParentType: Option[String], astParentFullName: Option[String]): NewMethod
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def methodNode(node: IASTNode, name: String, fullName: String, signature: String, fileName: String): NewMethod
- Definition Classes
- AstNodeBuilder
- def methodRefNode(node: IASTNode, code: String, methodFullName: String, typeFullName: String): NewMethodRef
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def methodStubAst(method: NewMethod, parameters: Seq[NewMethodParameterIn], methodReturn: NewMethodReturn, modifiers: Seq[NewModifier]): Ast
- Definition Classes
- AstCreatorBase
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newCommentNode(node: IASTNode, code: String, filename: String): NewComment
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def newImportNode(code: String, importedEntity: String, include: IASTPreprocessorIncludeStatement): NewImport
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def newJumpTargetNode(node: IASTNode): NewJumpTarget
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def newMethodReturnNode(node: IASTNode, typeFullName: String): NewMethodReturn
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def newNamespaceBlockNode(node: IASTNode, name: String, fullname: String, code: String, filename: String): NewNamespaceBlock
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def nodeSignature(node: IASTNode): String
The CDT utility method is unfortunately in a class that is marked as deprecated, however, this is because the CDT team would like to discourage its use but at the same time does not plan to remove this code.
The CDT utility method is unfortunately in a class that is marked as deprecated, however, this is because the CDT team would like to discourage its use but at the same time does not plan to remove this code.
- Definition Classes
- MacroHandler
- Annotations
- @nowarn()
- def notHandledYet(node: IASTNode): Ast
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def nullSafeAst(node: IASTStatement, argIndex: Int = -1): Seq[Ast]
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def nullSafeAst(node: IASTExpression): Ast
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def nullSafeAst(node: IASTExpression, argIndex: Int): Ast
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def nullSafeCode(node: IASTNode): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def parameterInNode(node: IASTNode, name: String, code: String, index: Int, isVariadic: Boolean, evaluationStrategy: String, typeFullName: Option[String]): NewMethodParameterIn
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def parameterInNode(node: IASTNode, name: String, code: String, index: Int, isVariadic: Boolean, evaluationStrategy: String, typeFullName: String): NewMethodParameterIn
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def registerType(typeName: String): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def returnAst(returnNode: NewReturn, arguments: Seq[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def returnNode(node: IASTNode, code: String): NewReturn
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- val scope: Scope[String, (NewNode, String), NewNode]
- Attributes
- protected
- def setArgumentIndices(arguments: Seq[Ast]): Unit
- Definition Classes
- AstCreatorBase
- def shortName(node: IASTNode): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def shortenCode(code: String, length: Int = MaxCodeLength): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def staticInitMethodAst(initAsts: List[Ast], fullName: String, signature: Option[String], returnType: String, fileName: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast
- Definition Classes
- AstCreatorBase
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def templateParameters(e: IASTNode): Option[String]
- Attributes
- protected
- Definition Classes
- AstForTypesCreator
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryCatchAst(tryNode: NewControlStructure, tryBodyAst: Ast, catchAsts: Seq[Ast], finallyAst: Option[Ast]): Ast
- Definition Classes
- AstCreatorBase
- def typeDeclNode(node: IASTNode, name: String, fullName: String, filename: String, code: String, astParentType: String, astParentFullName: String, inherits: Seq[String], alias: Option[String]): NewTypeDecl
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def typeDeclNode(node: IASTNode, name: String, fullName: String, fileName: String, inheritsFrom: Seq[String], alias: Option[String]): NewTypeDecl
- Definition Classes
- AstNodeBuilder
- def typeFor(node: IASTNode, stripKeywords: Boolean = true): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- Annotations
- @nowarn()
- def typeForDeclSpecifier(spec: IASTNode, stripKeywords: Boolean = true, index: Int = 0): String
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def typeRefNode(node: IASTNode, code: String, typeFullName: String): NewTypeRef
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- def uniqueName(target: String, name: String, fullName: String): (String, String)
- Attributes
- protected
- Definition Classes
- AstCreatorHelper
- def unknownNode(node: IASTNode, code: String): NewUnknown
- Attributes
- protected
- Definition Classes
- AstNodeBuilder
- val usingDeclarationMappings: Map[String, String]
- Attributes
- protected
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def whileAst(condition: Option[Ast], body: Seq[Ast], code: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast
- Definition Classes
- AstCreatorBase
- def withArgumentIndex[T <: ExpressionNew](node: T, argIdxOpt: Option[Int]): T
- Definition Classes
- AstCreatorBase
- def withArgumentName[T <: ExpressionNew](node: T, argNameOpt: Option[String]): T
- Definition Classes
- AstCreatorBase
- def withIndex[T, X](nodes: Array[T])(f: (T, Int) => X): Seq[X]
- Definition Classes
- AstCreatorBase
- def withIndex[T, X](nodes: Seq[T])(f: (T, Int) => X): Seq[X]
- Definition Classes
- AstCreatorBase
- def wrapMultipleInBlock(asts: Seq[Ast], lineNumber: Option[Integer]): Ast
- Definition Classes
- AstCreatorBase
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated