Class Handler<S,T,L extends LanguageFrontend>
java.lang.Object
de.fraunhofer.aisec.cpg.frontends.Handler<S,T,L>
- Type Parameters:
S- the result node or a collection of nodesT- the raw ast node specific to the parserL- the language frontend
- Direct Known Subclasses:
DeclarationHandler,ExpressionHandler,StatementHandler
public abstract class Handler<S,T,L extends LanguageFrontend>
extends java.lang.Object
A
Handler is an abstract base class for a class that translates AST nodes from a raw ast
type, usually supplied by a language parser into our generic CPG nodes.-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
log
protected static final org.slf4j.Logger log -
map
-
lang
-
-
Constructor Details
-
Handler
-
-
Method Details
-
handle
Searches for a handler matching the most specific superclass ofHandler. The created map should thus contain a handler for every semantically different AST node and can reuse handler code as long as the handled AST nodes have a common ancestor.- Parameters:
ctx- The AST node, whose handler is matched with respect to the AST node class.- Returns:
- most specific handler.
-