private ModelReference<?> mapSubject(ModelReference<?> subject, ModelPath targetPath) { if (subject.getPath() == null) { return subject.inScope(targetPath); } else { return subject.withPath(targetPath.descendant(subject.getPath())); } }
private void mapInputs(List<ModelReference<?>> inputs, ModelPath targetPath) { for (int i = 0; i < inputs.size(); i++) { ModelReference<?> input = inputs.get(i); if (input.getPath() != null) { inputs.set(i, input.withPath(targetPath.descendant(input.getPath()))); } else { inputs.set(i, input.inScope(ModelPath.ROOT)); } } }