コード例 #1
0
 private ModelReference<?> mapSubject(ModelReference<?> subject, ModelPath targetPath) {
   if (subject.getPath() == null) {
     return subject.inScope(targetPath);
   } else {
     return subject.withPath(targetPath.descendant(subject.getPath()));
   }
 }
コード例 #2
0
 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));
     }
   }
 }