/** Find the type of the variable. The default behavior is to first * search for the local variable declaration and then possibly for * the global declaration and if the declaration position is found * to get the first word on that position. * @return it returns Object to enable the custom implementations * to return the appropriate instances. */ public Object findType(String varName, int varPos) { Object type = null; Map varMap = getLocalVariableMap(varPos); // first try local vars if (varMap != null) { type = varMap.get(varName); } if (type == null) { varMap = getGlobalVariableMap(varPos); // try global vars if (varMap != null) { type = varMap.get(varName); } } return type; }
/** * Find the type of the variable. The default behavior is to first search * for the local variable declaration and then possibly for the global * declaration and if the declaration position is found to get the first * word on that position. * * @return it returns Object to enable the custom implementations to return * the appropriate instances. */ public Object findType(String varName, int varPos) { Object type = null; Map varMap = getLocalVariableMap(varPos); // first try local vars if (varMap != null) { type = varMap.get(varName); } if (type == null) { varMap = getGlobalVariableMap(varPos); // try global vars if (varMap != null) { type = varMap.get(varName); } } return type; }