Return the Element which corresponds to the given variable name without
duplicating the value. This is useful when dealing with SELF or with
variables in a context where it is known that the value won't be
modified.
485111
public Element getGlobalVariable(String name) {
		GlobalVariable gvar = globalVariables.get(name);
		return (gvar != null) ? gvar.getValue() : null;
	}
1029860
private static String getVariableName(String value) {
        assert value.charAt(0) == '{';
        assert value.charAt(value.length() - 1) == '}';
        return value.substring(1, value.length() - 1);
    }
124823
def is_missing_variable(
    value_node: ValueNode, variables: Dict[str, Any] = None
) -> bool:
    """"""
    return isinstance(value_node, VariableNode) and (
        not variables or is_invalid(variables.get(value_node.name.value, INVALID))
    )
1153188
def _get_value(self, var):
        """"""
        return self._problem._p.getVarByName(self._problem._variables[var]).x
123617
def element(i)
      unless i.matched?
        unless (0 ... shape.last).member? i
          raise "Index must be in 0 ... #{shape.last} (was #{i})"
        end
        i = INT.new i
      end
      i.size = @index.size if i.is_a?(Variable) and @index.size.get
      @term.subst @index => i
    end
102953
public Object resolveVariable(String pName) throws ELException {
		ELContext ctx = this.getELContext();
		return ctx.getELResolver().getValue(ctx, null, pName);
	}
578481
public V getVar(String name) {
    ImplicitVar implicit = name != null ? ImplicitVar.of(name) : null;
    if (implicit != null) {
      return getImplicitVar(implicit, true);
    }
    S scope = thisScope();
    while (scope != null) {
      V var = scope.getOwnSlot(name);
      if (var != null) {
        return var;
      }
      // Recurse up the parent Scope
      scope = scope.getParent();
    }
    return null;
  }
981046
def _get_bool_val(self, name):
        
        element = getattr(self, name)
        if element is None:
            return None
        return element.val
812365
public String lookupVariableDefaultValue(String variableName) {
        ConfigVariable cv = configVariables.get(variableName);
        return cv == null ? null : cv.getDefaultValue();
    }
375401
public String getVariableQualifiedName(VariableElement var) {
    String shortName = getVariableShortName(var);
    if (ElementUtil.isGlobalVar(var)) {
      String className = getFullName(ElementUtil.getDeclaringClass(var));
      if (ElementUtil.isEnumConstant(var)) {
        // Enums are declared in an array, so we use a macro to shorten the
        // array access expression.
        return "JreEnum(" + className + ", " + shortName + ")";
      }
      return className + '_' + shortName;
    }
    return shortName;
  }
726741
public final Variable getVariable(int variableNum) {
    int index = getVariableIndex(variableNum);
    if (index >= 0) {
      return vars[index];
    } else {
      return null;
    }
  }
1038334
def _get_unique_variable_name(vname, variables):
    '''
    '''
    count = 2
    vname_base = vname
    while vname in variables:
        vname = '{}_{}'.format(vname_base, count)
        count += 1
    return vname
1184408
@Override
    @SuppressWarnings("unchecked")
    public <T> Variable<T> getVariable(final String variableName) {
        final String[] subTokens = getSubVariableTokens(variableName);
        if (subTokens != null) {
            final Variable<T> sub = getSubVariable(subTokens[0], subTokens[1]);
            if (sub != null) {
                return sub;
            }
        }
        final Variable<T> v;
        synchronized (variables) {
            v = variables.get(variableName);
        }
        return v;
    }
1238451
public Variable variable(final String name) {
    Variable var = this.posLiterals.get(name);
    if (var == null) {
      var = new Variable(name, this);
      this.posLiterals.put(name, var);
    }
    return var;
  }
924145
def xpathVariableLookup(self, name):
        
        ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
        if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
        return xpathObjectRet(ret)
830903
public SDVariable getVariable(String name) {
        Variable v = variables.get(name);
        return v == null ? null : v.getVariable();
    }
938167
protected int findVarDef( String name)
    {
    int varCount = name==null? 0 : vars_.size();
    int i;
    for( i = 0; i < varCount && !name.equals( vars_.get(i).getName()); i++);
    return i < varCount? i : -1;
    }