Gets any variables in {@code this} whose values are objects of
type {@code T}.

@return
979063
public final List<ObjectVariable> getObjectVariables() {
    List<ObjectVariable> objectVars = new ArrayList<ObjectVariable>();
    for (int i = 0; i < vars.length; i++) {
      if (vars[i] instanceof ObjectVariable) {
        objectVars.add((ObjectVariable) vars[i]);
      }
    }
    return objectVars;
  }
950817
private static Map<TypeVariable<?>, Type> getTypeVariableMap(Class<?> type) {
        return getTypeVariableMap(type, new HashSet<Type>());
    }
931804
public List<AssignmentRow> getAssignmentRows(VariableType varType) {
        List<AssignmentRow> rows = new ArrayList<AssignmentRow>();
        List<Variable> handledVariables = new ArrayList<Variable>();
        // Create an AssignmentRow for each Assignment
        for (Assignment assignment : assignments) {
            if (assignment.getVariableType() == varType) {
                String dataType = getDisplayNameFromDataType(assignment.getDataType());
                AssignmentRow row = new AssignmentRow(assignment.getName(),
                                                      assignment.getVariableType(),
                                                      dataType,
                                                      assignment.getCustomDataType(),
                                                      assignment.getProcessVarName(),
                                                      assignment.getConstant());
                rows.add(row);
                handledVariables.add(assignment.getVariable());
            }
        }
        List<Variable> vars = null;
        if (varType == VariableType.INPUT) {
            vars = inputVariables;
        } else {
            vars = outputVariables;
        }
        // Create an AssignmentRow for each Variable that doesn't have an Assignment
        for (Variable var : vars) {
            if (!handledVariables.contains(var)) {
                AssignmentRow row = new AssignmentRow(var.getName(),
                                                      var.getVariableType(),
                                                      var.getDataType(),
                                                      var.getCustomDataType(),
                                                      null,
                                                      null);
                rows.add(row);
            }
        }

        return rows;
    }
1245020
public Object getValue() {
    if (!type.isCachable() || cachedValue == null) {
      cachedValue = type.getValue(this);
    }
    return cachedValue;
  }
358278
public List<Type> closure(Type t) {
        List<Type> cl = closureCache.get(t);
        if (cl == null) {
            Type st = supertype(t);
            if (!t.isCompound()) {
                if (st.hasTag(CLASS)) {
                    cl = insert(closure(st), t);
                } else if (st.hasTag(TYPEVAR)) {
                    cl = closure(st).prepend(t);
                } else {
                    cl = List.of(t);
                }
            } else {
                cl = closure(supertype(t));
            }
            for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail)
                cl = union(cl, closure(l.head));
            closureCache.put(t, cl);
        }
        return cl;
    }
505225
public List<Variable> getUsedVariables() {
        ArrayList<Variable> vars = new ArrayList<Variable>();

        for (Operand o : getOperands()) {
            o.addUsedVariables(vars);
        }

        return vars;
    }
1215461
public static <T> Class<?>[] getClasses(Type[] types) {
        if (types == null)
            return null;
        if (types.length == 0)
            return new Class<?>[0];

        Class<?>[] classes = new Class[types.length];
        // Resolve types by chasing down type variables.
        for (int i = 0; i < types.length; i++) {
            classes[i] = getClass(types[i]);
        }
        return classes;
    }
919924
protected Map getAllVariables(){
        try{
            Iterator names = FreeMarkerTL.getEnvironment().getKnownVariableNames().iterator();
            Map vars = new HashMap();
            while (names.hasNext()) {
                Object name =names.next();
                vars.put(name, get(name.toString()));
            }
            return vars;
        }catch(Exception e){
            throw new ViewException(e);
        }
    }
320748
public VariableRef[] getOutOfScopeVariableRefs() {
        Scope parent;
        if ((parent = getParent()) == null) {
            return new VariableRef[0];
        }

        Collection<VariableRef> allRefs = new ArrayList<VariableRef>();
        fillVariableRefs(allRefs, this);

        Collection<VariableRef> refs =
            new ArrayList<VariableRef>(allRefs.size());

        Iterator<VariableRef> it = allRefs.iterator();
        while (it.hasNext()) {
            VariableRef ref = it.next();
            Variable var = ref.getVariable();
            if (var != null &&
                parent.getDeclaredVariable(var.getName()) == var) {
                refs.add(ref);
            }
        }

        VariableRef[] refsArray = new VariableRef[refs.size()];
        return refs.toArray(refsArray);
    }
512464
public List<T> getItems() {
        JsArray<JavaScriptObject> js_items = getItems(getElement());
        List<T> items = new ArrayList<T>();
        
        for(int i=0; i<js_items.length(); i++) {
            @SuppressWarnings("unchecked")
            T item = (T) js_items.get(i);
            items.add(item);
        }
        
        return items;
    }
56740
public List<String> getVariableNames() {

		return variables.asList().stream() //
				.map(TemplateVariable::getName) //
				.collect(Collectors.toList());
	}
786546
public List<T> getVariable() throws InitializationTypeConflictException {
		if (!materialized) {
			throw new IllegalStateException("The Broadcast Variable has not yet been materialized.");
		}
		if (disposed) {
			throw new IllegalStateException("The Broadcast Variable has been disposed");
		}

		synchronized (references) {
			if (transformed != null) {
				if (transformed instanceof List) {
					@SuppressWarnings("unchecked")
					List<T> casted = (List<T>) transformed;
					return casted;
				} else {
					throw new InitializationTypeConflictException(transformed.getClass());
				}
			}
			else {
				return data;
			}
		}
	}
1259580
public T get() {
    T value = object;
    if (value == null) {
      synchronized (this) {
        value = object;
        if (object == null) {
          object = value = supplier.get();
        }
      }
    }
    return value;
  }
1247834
public Map<String, Object> getVariables() {
    final HashMap<String, Object> map = new HashMap<String, Object>();
    if (inherited != null)
      map.putAll(inherited.getVariables());
    if (variables != null)
      map.putAll(variables);
    return map;
  }
894321
public String[] getVariables()
    {
        if (variables == null)
        {
            variables = new LinkedHashSet<String>();
            for (Expression e : getExpressions())
            {
                for (VarSpec v : e.getVarSpecs())
                {
                    variables.add(v.getVariableName());
                }
            }
        }
        return variables.toArray(new String[variables.size()]);
    }
973754
public Set<T> types() {
        // NOTE: purely unoptimized!
        Set<T> types = new HashSet<T>();
        for (Object o : edges.values()) {
            Set<T> s = (Set<T>)o;
            types.addAll(s);
        }
        return types;
    }
572657
public SortedSet<Variable> variables() {
    if (this.variables == null) {
      this.variables = new TreeSet<>();
      for (final Formula f : this.formulas)
        this.variables.addAll(f.variables());
    }
    return this.variables;
  }