Helper method. Retrieves all the variables defined in the path.

@param routePath the route path as defined in the routes.config file.

@return a List object with the names of the variables.
188798
private List<String> getVariables(String routePath) {
		List<String> variables = new ArrayList<String>();

		Matcher matcher = Pattern.compile(Path.VAR_REGEXP).matcher(routePath);
		while (matcher.find()) {
			// group(0) always stands for the entire expression and we only want what is inside the {}
			variables.add(matcher.group(1));
		}

		return variables;
	}
509019
private function getRouteVars(RouteContextInterface $context, array $parameters)
    {
        return array_merge(
            array_combine(array_values($v = $context->getVars()), array_fill(1, count($v), null)),
            $parameters
        );
    }
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);
        }
    }
473346
public static List<String> readLinesWithClasspathOrFilePath(
            String classpathOrFilePath) {
        return getStringListAsOptWithClasspath(classpathOrFilePath)
                .filter(JMPredicate.getGreaterSize(0))
                .orElseGet(() -> JMFiles.readLines(classpathOrFilePath));
    }
502558
public static Map<String, String> getXpathVariables(Map<String, Collection<AttributeBean>> attributeMap) {
        // Set all the bind variables in the query context

        Map<String, String> variables = new HashMap<String, String>();

        for (String t : targets) {
            int count = 0;
            for (AttributeBean bean : attributeMap.get(t.toLowerCase()
                                                       + "Attributes")) {
                if (bean.getId().equals(XACML_RESOURCE_ID)) {
                    variables.put("XacmlResourceId", bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug("XacmlResourceId = '" + bean.getId()
                                  + "'");
                    }


                    int c = 0;
                    for (String value : bean.getValues()) {
                        variables.put("XacmlResourceIdValue"
                                          + c, value);
                        if (log.isDebugEnabled()) {
                            log.debug("XacmlResourceIdValue"
                                      + c + " = '" + value + "'");
                        }


                        c++;
                    }
                } else {
                    variables.put(t + "Id" + count,
                                             bean.getId());

                    if (log.isDebugEnabled()) {
                        log.debug(t + "Id" + count + " = '" + bean.getId()
                                  + "'");
                    }

                    int valueCount = 0;
                    for (String value : bean.getValues()) {
                        variables.put(t + "Id" + count
                                                 + "-Value"
                                                 + valueCount,
                                                 value);
                        if (log.isDebugEnabled()) {
                            log.debug(t + "Id" + count + "-Value"
                                      + valueCount + " = '" + value + "'");
                        }

                        valueCount++;
                    }

                    count++;
                }
            }
        }
        return variables;


    }
501244
public List<Object> getAllJsonPath(String json, String jsonPath) {
        List<Object> result;
        if (JsonPath.isPathDefinite(jsonPath)) {
            Object val = getJsonPath(json, jsonPath);
            if (val == null) {
                result = Collections.emptyList();
            } else {
                result = Collections.singletonList(val);
            }
        } else {
            result = parseJson(json).read(jsonPath);
        }
        return result;
    }
558143
static String[] getPathNames(String path) {
    if (path == null || !path.startsWith(Path.SEPARATOR)) {
      return null;
    }
    return StringUtils.split(path, Path.SEPARATOR_CHAR);
  }
541094
private ArrayList<String> getBindList(String path)
  {
    if (! path.endsWith("/")) {
      path = path + "/";
    }

    ArrayList<String> bindList = new ArrayList<>();

    for (String bindPath : _bindMap.keySet()) {
      if (bindPath.startsWith(path)) {
        int p = bindPath.indexOf('/', path.length());

        String subpath = null;

        if (p > 0) {
          subpath = bindPath.substring(path.length(), p);
        }
        else {
          subpath = bindPath.substring(path.length());
        }

        if (! bindList.contains(subpath)) {
          bindList.add(subpath);
        }
      }
    }

    return bindList;
  }
551164
public List<State> getPrefixStates(Path path) {
        List<State> result = new LinkedList<>();
        for (State state : stateMap.values()) {
            if (state.getPath().isPrefixOf(path)) {
                result.add(state);
            }
        }
        return result;
    }
822457
public List<String> getPaths() {
        final List<String> resourcePaths = new ArrayList<>(this.size());
        for (final Resource resource : this) {
            resourcePaths.add(resource.getPath());
        }
        return resourcePaths;
    }
542686
public static List<Variable> getRunTimeVariables(
      final Collection<Variable> variables) {
    final List<Variable> runtimeVariables =
        ReportalUtil.getVariablesByRegex(variables,
            Reportal.REPORTAL_CONFIG_PREFIX_NEGATION_REGEX);

    return runtimeVariables;
  }
705421
function getReferences(path, variableName) {
  const bindings = path.scope.getBinding(variableName);
  const references = bindings.referencePaths;
  return references;
}
958846
def read_varnames(self, path="/"):
        """"""
        if path == "/":
            return self.rootgrp.variables.keys()
        else:
            group = self.path2group[path]
            return group.variables.keys()
483885
private String resolvePathVariables(String inputPath) {
        if (PathUtil.containsSymbol(inputPath)) {
            return locationService.resolveString(inputPath);
        } else {
            return inputPath;
        }
    }
1312380
public JBBPNamedFieldInfo findFieldForPath(final String fieldPath) {

    JBBPNamedFieldInfo result = null;

    for (final JBBPNamedFieldInfo f : this.namedFieldData) {
      if (f.getFieldPath().equals(fieldPath)) {
        result = f;
        break;
      }
    }
    return result;
  }
658163
public static String get(String subPath) {
        String dataStr = null;
        try {
            dataStr = loadingCache.get(subPath).snd;
        } catch (ExecutionException e) {
            LOG.error(e);
        }
        return dataStr;
    }
727025
public static String getPathOr(String var, String def) {
        String path = AcePathfinder.INSTANCE.getPath(var);
        if (path == null) {
            path = def;
        }
        return path;
    }