This method retrieves a variable associated with the
current trace.

@return The variable value, or null if not found
516352
public void setVariable(String name, Object value) {
        TraceState ts = traceState.get();

        if (ts != null) {
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Set variable '" + name + "' value = " + value);
            }
            ts.getVariables().put(name, value);
        } else if (log.isLoggable(Level.FINEST)) {
            log.finest("Set variable '" + name + "' value = " + value + "' requested, but no trace state");
        }
    }
565272
protected Object unknownVariable(JexlException xjexl) {
		// don't throw the exception
		if (!silent) {
			logger.trace(xjexl.getMessage());
		}
		return null;
	}
748187
private static final Object getCurrentUOWCoord() {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(TRACE, "getCurrentUOWCoord");
        }

        Object currentUOW = null;
        if (isRunningInWAS()) {
            currentUOW = EmbeddableTransactionManagerFactory.getUOWCurrent().getUOWCoord();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(TRACE, "getCurrentUOWCoord", currentUOW);
        }
        return currentUOW;
    }
1279613
private String getVariable(GDLParser.HeaderContext header) {
    if (header != null && header.Identifier() != null) {
      return header.Identifier().getText();
    }
    return null;
  }
704422
@Override
    public String getValue(final String variable) throws NotAvailableException {
        try {
            return VariableProcessor.resolveVariables(VariableProcessor.resolveVariable(variable, variableProviderPool), true, variableProviderPool);
        } catch (MultiException ex) {
            throw new NotAvailableException("Variable[" + variable + "]", ex);
        }
    }
301968
public VarValueDef getBinding( VarDef var)
    {
    VarBindingDef binding = bindings_.get( var);
    return
      binding == null
      ? null
      : binding.getValueDef();
    }
488647
public synchronized String getCheckpointedValue() {
		int index = (int)(getCheckpointedSequence() - firstValueSequence);
		return (index >= 0) ? values.get(index) : null; 
	}
411125
protected Variable getImportedVar(final String name) throws UtilEvalError {
        Variable var = null;
        // Try object imports
        for (final Object object : this.importedObjects) {
            final Invocable field = Reflect.resolveJavaField(object.getClass(),
                    name, false/* onlyStatic */);
            if (field != null)
                var = this.createVariable(name, field.getReturnType(), new LHS(object, field));
            else if (this.isClass) {
                // try find inherited loose-typed instance fields
                Class<?> supr = object.getClass();
                while (Reflect.isGeneratedClass(supr = supr.getSuperclass())) {
                    This ths = Reflect.getClassInstanceThis(object, supr.getSimpleName());
                    if (null != ths && null != (var = ths.getNameSpace().variables.get(name)))
                        break;
                }
            }
            if (null != var) {
                this.variables.put(name, var);
                return var;
            }
        }
        // Try static imports
        for (final Class<?> stat : this.importedStatic) {
            final Invocable field = Reflect.resolveJavaField(stat,
                    name, true/* onlyStatic */);
            if (field != null) {
                var = this.createVariable(name, field.getReturnType(),
                        new LHS(field));
                this.variables.put(name, var);
                return var;
            }
        }
        return null;
    }
712544
public String getExceptionStackTrace() {
        Throwable t = getException();
        if (t == null) {
            return null;
        }
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        t.printStackTrace(pw);
        return sw.toString();
    }
700448
public synchronized boolean variablesChanged() {
        for (Map.Entry<String, Object> entry : variableCache.entrySet()) {
            String variableName = entry.getKey();
            Object oldVariableValue = entry.getValue();
            Object newVariableValue = lookupVariable(variableName);
            if (newVariableValue == null) {
                newVariableValue = defaultVariableCache.get(variableName);
            }
            if (!isEqual(oldVariableValue, newVariableValue)) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Variable " + variableName + " has changed. Old value: " + oldVariableValue + " New value: " + newVariableValue);
                }
                return true;
            }
        }
        return false;
    }
142339
public final int getVariableByName(String variableName) {
    int index = getVariableIndex(variableName);
    if (index == -1) {
      return index;
    } else {
      return nums[index];
    }
  }
505402
private IntVar getEarlyVar() {
        IntVar earlyVar = null;
        for (int i = stays.nextSetBit(0); i >= 0; i = stays.nextSetBit(i + 1)) {
            if (starts[i] != null && !starts[i].isInstantiated()) {
                if (earlyVar == null) {
                    earlyVar = starts[i];
                } else {
                    if (earlyVar.getLB() > starts[i].getLB()) {
                        earlyVar = starts[i];
                    }
                }
            }
        }
        return earlyVar;
    }
724247
@SuppressWarnings("unchecked")
  public E get()
  {
    Thread thread = Thread.currentThread();
    ClassLoader loader = thread.getContextClassLoader();

    Object value = null;

    for (; loader != null; loader = loader.getParent()) {
      if (loader instanceof EnvironmentClassLoader) {
        EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader;

        value = envLoader.getAttribute(_varName);

        if (value != null)
          return (E) value;
      }
    }

    return _globalValue;
  }
237897
synchronized Provider getProvider() {
        // volatile variable load
        Provider p = provider;
        if (p != null) {
            return p;
        }
        if (shouldLoad() == false) {
            return null;
        }
        if (isLoading) {
            // because this method is synchronized, this can only
            // happen if there is recursion.
//            if (debug != null) {
//                debug.println("Recursion loading provider: " + this);
//                new Exception("Call trace").printStackTrace();
//            }
            return null;
        }
        try {
            isLoading = true;
            tries++;
            p = doLoadProvider();
        } finally {
            isLoading = false;
        }
        provider = p;
        return p;
    }
362848
public String getTrigger() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "getTrigger returning " + trigger);
        return this.trigger;
    }
327248
public VarValueDef getValue( Object name)
    {
    int i = findValue( name);
    return i >= 0? values_.get(i) : null;
    }
1330552
public int lookupVariableName(String varName) {
        Integer varNoWrapper = varNameToNoMap.get(varName.toUpperCase());
        if (varNoWrapper == null) {
            return -1;
        }
        int varNo = varNoWrapper.intValue();
        return varNo;
    }