1 package org.catacomb.druid.blocks;
2
3 import org.catacomb.interlish.service.ResourceAccess;
4 import org.catacomb.interlish.structure.AddableTo;
5 import org.catacomb.interlish.structure.AdderTo;
6 import org.catacomb.report.E;
7
8
9
10 public class ChildrenOf implements AdderTo {
11
12 public String src;
13
14
15
16 public void addTo(AddableTo ato) {
17
18 Object obj = ResourceAccess.getResourceLoader().getResource(src, null);
19
20 if (obj instanceof AdderTo) {
21 ((AdderTo)obj).addTo(ato);
22 } else {
23 E.error("cant add children from " + obj);
24 }
25
26 }
27
28
29
30 }