Example #1
0
 private void popContext() {
   if (nameStack.size() > 0) namesMap = (LinkedHashMap) nameStack.pop();
   if (typeStack.size() > 0) typeVariablesMap = (HashMap) typeStack.pop();
 }
Example #2
0
 /**
  * Save a stack of names and type vars maps. Given argument is list of bindings from which we
  * construct a linked map to store names
  *
  * @param linkedHashMap
  */
 private void pushContext(Map bindings) {
   nameStack.push(namesMap);
   typeStack.push(typeVariablesMap);
   namesMap = new LinkedHashMap(bindings);
   typeVariablesMap = new HashMap();
 }