示例#1
0
 @Override
 public IConfigurationElement[] getChildren(String name) throws InvalidRegistryObjectException {
   List<XMLConfigElement> result = new ArrayList<XMLConfigElement>();
   for (XMLConfigElement e : children) {
     if (name.equals(e.getName())) result.add(e);
   }
   return result.toArray(new XMLConfigElement[result.size()]);
 }
示例#2
0
 public XMLConfigElement(Object parent, String name) {
   this.parent = parent;
   if (parent instanceof XMLConfigElement) {
     ((XMLConfigElement) parent).children.add(this);
   }
   this.name = name;
 }
示例#3
0
 @Override
 public IConfigurationElement[] getConfigurationElements()
     throws InvalidRegistryObjectException {
   return root.getChildren();
 }
示例#4
0
 @Override
 public IExtension getDeclaringExtension() throws InvalidRegistryObjectException {
   XMLConfigElement root = this;
   while (root.getParent() instanceof XMLConfigElement) root = (XMLConfigElement) root.getParent();
   return new XMLExtension(root);
 }