Class JDTJava2CAstTranslator.MethodContext
java.lang.Object
com.ibm.wala.cast.ir.translator.TranslatorToCAst.DelegatingContext<JDTJava2CAstTranslator.WalkContext, org.eclipse.jdt.core.dom.ASTNode>
com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator.DelegatingContext
com.ibm.wala.cast.java.translator.jdt.JDTJava2CAstTranslator.MethodContext
- All Implemented Interfaces:
TranslatorToCAst.WalkContext<JDTJava2CAstTranslator.WalkContext, org.eclipse.jdt.core.dom.ASTNode>, JDTJava2CAstTranslator.WalkContext
- Enclosing class:
JDTJava2CAstTranslator<T extends CAstSourcePositionMap.Position>
-
Field Summary
Fields inherited from class TranslatorToCAst.DelegatingContext
parent -
Constructor Summary
ConstructorsConstructorDescriptionMethodContext(JDTJava2CAstTranslator.WalkContext parent, Map<CAstNode, CAstEntity> entities) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a name declaration to this context.voidaddScopedEntity(CAstNode node, CAstEntity entity) associate a child entity with a given CAstNode, e.g.cfg()for recording control-flow relationships among the CAst nodesCollection<Pair<org.eclipse.jdt.core.dom.ITypeBinding, Object>> getCatchTargets(org.eclipse.jdt.core.dom.ITypeBinding label) for recording types of nodesbooleanpos()for recording source positionsMethods inherited from class TranslatorToCAst.DelegatingContext
getParent, topModifier and TypeMethodDescriptionTranslatorToCAst.WalkContext<JDTJava2CAstTranslator.WalkContext, org.eclipse.jdt.core.dom.ASTNode> org.eclipse.jdt.core.dom.ASTNodetop()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TranslatorToCAst.WalkContext
getBreakFor, getCatchTarget, getCatchTarget, getContinueFor, getScopedEntitiesModifier and TypeMethodDescriptiondefault org.eclipse.jdt.core.dom.ASTNodegetBreakFor(String label) for a 'break' style goto, return the control flow targetdefault CAstNodedefault CAstNodedefault org.eclipse.jdt.core.dom.ASTNodegetContinueFor(String label) for a 'continue' style goto, return the control flow targetdefault Map<CAstNode, Collection<CAstEntity>> get a mapping from CAstNodes to the scoped entities (e.g.
-
Constructor Details
-
MethodContext
-
-
Method Details
-
addNameDecl
Description copied from interface:TranslatorToCAst.WalkContextAdd a name declaration to this context. For variables or constants, n should be aCAstNode.DECL_STMT, and the initialization of the variable (if any) may occur in a separate assignment. For functions, n should be aCAstNode.FUNCTION_STMT, including the function body. -
getNameDecls
-
getLabelMap
- Specified by:
getLabelMapin interfaceJDTJava2CAstTranslator.WalkContext- Overrides:
getLabelMapin classJDTJava2CAstTranslator.DelegatingContext
-
cfg
Description copied from interface:TranslatorToCAst.WalkContextfor recording control-flow relationships among the CAst nodes -
addScopedEntity
Description copied from interface:TranslatorToCAst.WalkContextassociate a child entity with a given CAstNode, e.g. for a function declaration -
pos
Description copied from interface:TranslatorToCAst.WalkContextfor recording source positions -
getNodeTypeMap
Description copied from interface:TranslatorToCAst.WalkContextfor recording types of nodes -
getCatchTargets
public Collection<Pair<org.eclipse.jdt.core.dom.ITypeBinding, Object>> getCatchTargets(org.eclipse.jdt.core.dom.ITypeBinding label) - Specified by:
getCatchTargetsin interfaceJDTJava2CAstTranslator.WalkContext- Overrides:
getCatchTargetsin classJDTJava2CAstTranslator.DelegatingContext
-
needLValue
public boolean needLValue()- Specified by:
needLValuein interfaceJDTJava2CAstTranslator.WalkContext- Overrides:
needLValuein classJDTJava2CAstTranslator.DelegatingContext
-