Package de.fraunhofer.aisec.cpg
Class TranslationConfiguration
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.TranslationConfiguration
-
public class TranslationConfiguration extends java.lang.ObjectThe configuration for theTranslationManagerholds all information that is used during the translation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTranslationConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description booleancodeInNodesshould the code of a node be shown as parameter in the node *booleandebugParserSet to true to generate debug output for the parser.java.lang.String[]includePathsPaths to look for include files.booleanloadIncludesSet to true to transitively load include files into the CPG.java.util.Map<java.lang.String,java.lang.String>symbolsDefinition of additional symbols, mostly useful for C++.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TranslationConfiguration.Builderbuilder()java.util.List<Pass>getRegisteredPasses()java.util.List<java.io.File>getSourceLocations()java.util.Map<java.lang.String,java.lang.String>getSymbols()java.io.FilegetTopLevel()
-
-
-
Field Detail
-
debugParser
public final boolean debugParser
Set to true to generate debug output for the parser.
-
loadIncludes
public final boolean loadIncludes
Set to true to transitively load include files into the CPG.If this value is set to false but includePaths are given, the parser will resolve symbols/templates from these include, but do not load the parse tree into the CPG
-
includePaths
public final java.lang.String[] includePaths
Paths to look for include files.It is recommended to set proper include paths as otherwise unresolved symbols/templates will result in subsequent parser mistakes, such as treating "<" as a BinaryOperator in the following example: <code> std::unique_ptr<Botan::Cipher_Mode> bla; </code>
As long as loadIncludes is set to false, include files will only be parsed, but not loaded into the CPG. *
-
codeInNodes
public final boolean codeInNodes
should the code of a node be shown as parameter in the node *
-
symbols
public final java.util.Map<java.lang.String,java.lang.String> symbols
Definition of additional symbols, mostly useful for C++.
-
-
Method Detail
-
builder
public static TranslationConfiguration.Builder builder()
-
getSymbols
public java.util.Map<java.lang.String,java.lang.String> getSymbols()
-
getSourceLocations
public java.util.List<java.io.File> getSourceLocations()
-
getTopLevel
public java.io.File getTopLevel()
-
getRegisteredPasses
public java.util.List<Pass> getRegisteredPasses()
-
-