Package com.ibm.wala.cast.ir.translator
Class AstTranslator.AstLexicalInformation
- java.lang.Object
-
- com.ibm.wala.cast.ir.translator.AstTranslator.AstLexicalInformation
-
- All Implemented Interfaces:
AstMethod.LexicalInformation
- Enclosing class:
- AstTranslator
public static class AstTranslator.AstLexicalInformation extends Object implements AstMethod.LexicalInformation
lexical access information for some entity scope. used during call graph construction to handle lexical accesses.
-
-
Constructor Summary
Constructors Constructor Description AstLexicalInformation(AstTranslator.AstLexicalInformation original)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntSetgetAllExposedUses()return all value numbers appearing as entries in eitherAstMethod.LexicalInformation.getExposedUses(int)orAstMethod.LexicalInformation.getExitExposedUses()int[]getExitExposedUses()maps each exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()) to its value number at method exit.Pair<String,String>[]getExposedNames()names possibly accessed in a nested lexical scope, represented as pairs (name,nameOfDefiningEntity)int[]getExposedUses(int instructionOffset)get a map from exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()) to its value number at the instruction at offset instructionOffset.StringgetScopingName()get the name of this entity, as it appears in the definer portion of a lexical nameString[]getScopingParents()return the names of the enclosing methods declaring names that are lexically accessed by the entitystatic booleanhasExposedUses(CGNode caller, CallSiteReference site)booleanisReadOnly(String name)returns true if name may be read in nested lexical scopes but cannot be written
-
-
-
Constructor Detail
-
AstLexicalInformation
public AstLexicalInformation(AstTranslator.AstLexicalInformation original)
-
-
Method Detail
-
getExitExposedUses
public int[] getExitExposedUses()
Description copied from interface:AstMethod.LexicalInformationmaps each exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()) to its value number at method exit.- Specified by:
getExitExposedUsesin interfaceAstMethod.LexicalInformation
-
getExposedUses
public int[] getExposedUses(int instructionOffset)
Description copied from interface:AstMethod.LexicalInformationget a map from exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()) to its value number at the instruction at offset instructionOffset.- Specified by:
getExposedUsesin interfaceAstMethod.LexicalInformation
-
getAllExposedUses
public IntSet getAllExposedUses()
Description copied from interface:AstMethod.LexicalInformationreturn all value numbers appearing as entries in eitherAstMethod.LexicalInformation.getExposedUses(int)orAstMethod.LexicalInformation.getExitExposedUses()- Specified by:
getAllExposedUsesin interfaceAstMethod.LexicalInformation
-
getExposedNames
public Pair<String,String>[] getExposedNames()
Description copied from interface:AstMethod.LexicalInformationnames possibly accessed in a nested lexical scope, represented as pairs (name,nameOfDefiningEntity)- Specified by:
getExposedNamesin interfaceAstMethod.LexicalInformation
-
getScopingParents
public String[] getScopingParents()
Description copied from interface:AstMethod.LexicalInformationreturn the names of the enclosing methods declaring names that are lexically accessed by the entity- Specified by:
getScopingParentsin interfaceAstMethod.LexicalInformation
-
isReadOnly
public boolean isReadOnly(String name)
Description copied from interface:AstMethod.LexicalInformationreturns true if name may be read in nested lexical scopes but cannot be written- Specified by:
isReadOnlyin interfaceAstMethod.LexicalInformation
-
getScopingName
public String getScopingName()
Description copied from interface:AstMethod.LexicalInformationget the name of this entity, as it appears in the definer portion of a lexical name- Specified by:
getScopingNamein interfaceAstMethod.LexicalInformation
-
hasExposedUses
public static boolean hasExposedUses(CGNode caller, CallSiteReference site)
-
-