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 voidaddScopedEntity(CAstNode newNode, CAstEntity visit)associate a child entity with a given CAstNode, e.g.CAstControlFlowRecordercfg()for recording control-flow relationships among the CAst nodesTgetBreakFor(String label)for a 'break' style goto, return the control flow targetTgetContinueFor(String label)for a 'continue' style goto, return the control flow targetCAstNodeTypeMapRecordergetNodeTypeMap()for recording types of nodesMap<CAstNode,Collection<CAstEntity>>getScopedEntities()get a mapping from CAstNodes to the scoped entities (e.g.CAstSourcePositionRecorderpos()for recording source positions
-
-
-
Method Detail
-
getScopedEntities
public Map<CAstNode,Collection<CAstEntity>> getScopedEntities()
Description copied from interface:TranslatorToCAst.WalkContextget a mapping from CAstNodes to the scoped entities (e.g. functions or local classes) introduced by those nodes. Also mapsnullto those entities not corresponding to any node (e.g nested classes)- Specified by:
getScopedEntitiesin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
addScopedEntity
public void addScopedEntity(CAstNode newNode, CAstEntity visit)
Description copied from interface:TranslatorToCAst.WalkContextassociate a child entity with a given CAstNode, e.g. for a function declaration- Specified by:
addScopedEntityin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
cfg
public CAstControlFlowRecorder cfg()
Description copied from interface:TranslatorToCAst.WalkContextfor recording control-flow relationships among the CAst nodes- Specified by:
cfgin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
pos
public CAstSourcePositionRecorder pos()
Description copied from interface:TranslatorToCAst.WalkContextfor recording source positions- Specified by:
posin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getNodeTypeMap
public CAstNodeTypeMapRecorder getNodeTypeMap()
Description copied from interface:TranslatorToCAst.WalkContextfor recording types of nodes- Specified by:
getNodeTypeMapin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getContinueFor
public T getContinueFor(String label)
Description copied from interface:TranslatorToCAst.WalkContextfor a 'continue' style goto, return the control flow target- Specified by:
getContinueForin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
getBreakFor
public T getBreakFor(String label)
Description copied from interface:TranslatorToCAst.WalkContextfor a 'break' style goto, return the control flow target- Specified by:
getBreakForin interfaceTranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
-
-