public Map<String, String> getCommands() { Set<Object> targets = new LinkedHashSet<>(); targets.addAll(Arrays.asList(targets)); Processor rover = domain; while (rover != null) { targets.add(rover); rover = rover.getParent(); } targets.add(this); TreeMap<String, String> result = new TreeMap<>(); targets.stream() .map(object -> object.getClass()) .flatMap(c -> Stream.of(c.getMethods())) .filter(m -> !Modifier.isStatic(m.getModifiers()) && Modifier.isPublic(m.getModifiers()) && m.getName() .startsWith("_")) .map(this::toEntry) .forEach(e -> result.put(e.getKey(), e.getValue())); return result; }
public Map<String, String> getCommands() { Set<Object> targets = new LinkedHashSet<>(); targets.addAll(Arrays.asList(targets)); Processor rover = domain; while (rover != null) { targets.add(rover); rover = rover.getParent(); } targets.add(this); TreeMap<String, String> result = new TreeMap<>(); targets.stream() .map(object -> object.getClass()) .flatMap(c -> Stream.of(c.getMethods())) .filter(m -> !Modifier.isStatic(m.getModifiers()) && Modifier.isPublic(m.getModifiers()) && m.getName() .startsWith("_")) .map(this::toEntry) .forEach(e -> result.put(e.getKey(), e.getValue())); return result; }
private String doCommands(String key, Link source) { String[] args = commands.split(key); if (args == null || args.length == 0) return null; for (int i = 0; i < args.length; i++) if (args[i].indexOf('\\') >= 0) args[i] = args[i].replaceAll("\\\\;", ";"); if (args[0].startsWith("^")) { String varname = args[0].substring(1).trim(); Processor parent = source.start.getParent(); if (parent != null) return parent.getProperty(varname); return null; } Processor rover = domain; while (rover != null) { String result = doCommand(rover, args[0], args); if (result != null) return result; rover = rover.getParent(); } for (int i = 0; targets != null && i < targets.length; i++) { String result = doCommand(targets[i], args[0], args); if (result != null) return result; } return doCommand(this, args[0], args); }
private String doCommands(String key, Link source) { String[] args = commands.split(key); if (args == null || args.length == 0) return null; for (int i = 0; i < args.length; i++) if (args[i].indexOf('\\') >= 0) args[i] = args[i].replaceAll("\\\\;", ";"); if (args[0].startsWith("^")) { String varname = args[0].substring(1).trim(); Processor parent = source.start.getParent(); if (parent != null) return parent.getProperty(varname); return null; } Processor rover = domain; while (rover != null) { String result = doCommand(rover, args[0], args); if (result != null) return result; rover = rover.getParent(); } for (int i = 0; targets != null && i < targets.length; i++) { String result = doCommand(targets[i], args[0], args); if (result != null) return result; } return doCommand(this, args[0], args); }
private String doCommands(String key, Link source) { String[] args = commands.split(key); if (args == null || args.length == 0) return null; for (int i = 0; i < args.length; i++) if (args[i].indexOf('\\') >= 0) args[i] = args[i].replaceAll("\\\\;", ";"); if (args[0].startsWith("^")) { String varname = args[0].substring(1).trim(); Processor parent = source.start.getParent(); if (parent != null) return parent.getProperty(varname); return null; } Processor rover = domain; while (rover != null) { String result = doCommand(rover, args[0], args); if (result != null) return result; rover = rover.getParent(); } for (int i = 0; targets != null && i < targets.length; i++) { String result = doCommand(targets[i], args[0], args); if (result != null) return result; } return doCommand(this, args[0], args); }
/** * */ public void forceRefresh() { included.clear(); Processor p = getParent(); properties = (p != null) ? new UTF8Properties(p.getProperties0()) : new UTF8Properties(); setProperties(propertiesFile, base); propertiesChanged(); }
/** * */ public void forceRefresh() { included.clear(); Processor p = getParent(); properties = (p != null) ? new UTF8Properties(p.getProperties0()) : new UTF8Properties(); setProperties(propertiesFile, base); propertiesChanged(); }
if (file.equals(p.getPropertiesFile())) continue nextFile; p = p.getParent();
if (file.equals(p.getPropertiesFile())) continue nextFile; p = p.getParent();
for (Processor proc = source; proc != null; proc = proc.getParent()) { Object raw = proc.getProperties() .get(key);
for (Processor proc = source; proc != null; proc = proc.getParent()) { Object raw = proc.getProperties() .get(key);
source = source.getParent();
break; source = source.getParent();
break; source = source.getParent();