Package com.ibm.wala.cast.ir.translator
Class TranslatorToCAst.RootContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
- java.lang.Object
-
- com.ibm.wala.cast.ir.translator.TranslatorToCAst.RootContext<C,T>
-
- All Implemented Interfaces:
TranslatorToCAst.WalkContext<C,T>
- Enclosing interface:
- TranslatorToCAst
public static class TranslatorToCAst.RootContext<C extends TranslatorToCAst.WalkContext<C,T>,T> extends Object implements TranslatorToCAst.WalkContext<C,T>
-
-
Constructor Summary
Constructors Constructor Description RootContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScopedEntity(CAstNode newNode, CAstEntity visit)
associate a child entity with a given CAstNode, e.g.CAstControlFlowRecorder
cfg()
for recording control-flow relationships among the CAst nodesT
getBreakFor(String label)
for a 'break' style goto, return the control flow targetT
getContinueFor(String label)
for a 'continue' style goto, return the control flow targetCAstNodeTypeMapRecorder
getNodeTypeMap()
for recording types of nodesMap<CAstNode,Collection<CAstEntity>>
getScopedEntities()
get a mapping from CAstNodes to the scoped entities (e.g.CAstSourcePositionRecorder
pos()
for recording source positions
-
-
-
Method Detail
-
getScopedEntities
public Map<CAstNode,Collection<CAstEntity>> getScopedEntities()
Description copied from interface:TranslatorToCAst.WalkContext
get a mapping from CAstNodes to the scoped entities (e.g. functions or local classes) introduced by those nodes. Also mapsnull
to those entities not corresponding to any node (e.g nested classes)- Specified by:
getScopedEntities
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
addScopedEntity
public void addScopedEntity(CAstNode newNode, CAstEntity visit)
Description copied from interface:TranslatorToCAst.WalkContext
associate a child entity with a given CAstNode, e.g. for a function declaration- Specified by:
addScopedEntity
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
cfg
public CAstControlFlowRecorder cfg()
Description copied from interface:TranslatorToCAst.WalkContext
for recording control-flow relationships among the CAst nodes- Specified by:
cfg
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
pos
public CAstSourcePositionRecorder pos()
Description copied from interface:TranslatorToCAst.WalkContext
for recording source positions- Specified by:
pos
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getNodeTypeMap
public CAstNodeTypeMapRecorder getNodeTypeMap()
Description copied from interface:TranslatorToCAst.WalkContext
for recording types of nodes- Specified by:
getNodeTypeMap
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getContinueFor
public T getContinueFor(String label)
Description copied from interface:TranslatorToCAst.WalkContext
for a 'continue' style goto, return the control flow target- Specified by:
getContinueFor
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getBreakFor
public T getBreakFor(String label)
Description copied from interface:TranslatorToCAst.WalkContext
for a 'break' style goto, return the control flow target- Specified by:
getBreakFor
in interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
-