Build an element to be inserted under the "parameters" tree.
330850
public static VoltXMLElement buildParamElement(String elementId, String index, String valueType) {
        VoltXMLElement retval = new VoltXMLElement("parameter");
        retval.attributes.put("id", elementId);
        retval.attributes.put("index", index);
        retval.attributes.put("valuetype", valueType);
        return retval;
    }
475136
private void addInjectedVariable(VariableElement element, String fieldName) {
    TypeName typeName = resolveVariableTypeName(element, messager);

    // Create field
    FieldSpec.Builder fieldBuilder = FieldSpec.builder(typeName, fieldName, Modifier.PUBLIC);

    // Copy field annotations
    element
        .getAnnotationMirrors()
        .stream()
        .map(AnnotationSpec::get)
        .forEach(fieldBuilder::addAnnotation);

    // If the variable element is a method parameter, it might not have the Inject annotation
    if (!hasInjectAnnotation(element)) {
      fieldBuilder.addAnnotation(Inject.class);
    }

    // And add field
    builder.addField(fieldBuilder.build());
  }
1149355
public static void add(Element element) {
        AssertUtils.assertNotNull(element);

        ProcessedInput processedInput = null;
        Overrider overrider = new Overrider(defaultOverride);

        overrider.override(XmlParameters.operationType, element.getTagName());

        if (element.hasAttribute(XmlParameters.outputHandler) == true) {
            overrider.override(XmlParameters.outputHandler, element.getAttribute(XmlParameters.outputHandler));
        }

        if (element.hasAttribute(XmlParameters.controlParamCount) == true) {
            overrider.override(XmlParameters.controlParamCount, Boolean.valueOf(element.getAttribute(XmlParameters.controlParamCount)));
        }

        if (element.hasAttribute(XmlParameters.generateKeys) == true) {
            overrider.override(XmlParameters.generateKeys, element.getAttribute(XmlParameters.generateKeys));
        }

        if (element.hasAttribute(XmlParameters.generateKeysColumns) == true) {
            overrider.override(XmlParameters.generateKeysColumns, element.getAttribute(XmlParameters.generateKeysColumns).split(","));
        }

        String name = element.getAttribute("id");
        String encodedQuery = element.getTextContent();

        xmlQueryString.put(name, encodedQuery);
        xmlOverrideMap.put(name, overrider);
    }
280938
def build(self) -> str:
        """"""
        self._set_autoreload()
        return ''.join(child.html for child in self.childNodes)
1113053
def createElement(self, tag: str) -> Node:
        """"""
        return create_element(tag, base=self._default_class)
111374
public static void insertBefore(Element newElement, Element before) {
        before.parentNode.insertBefore(newElement, before);
    }
363914
protected void addParameters(ExecutableElement member, Content htmltree, int indentSize) {
        addParameters(member, true, htmltree, indentSize);
    }
1260612
def setup_parameters(self):
        """"""
        t = self.template
        parameters = self.get_parameter_definitions()

        if not parameters:
            logger.debug("No parameters defined.")
            return

        for name, attrs in parameters.items():
            p = build_parameter(name, attrs)
            t.add_parameter(p)
1138132
def insert(self, index, value):
        ''''''
        newnode = LookupTreeNode(index, value)
        level = 0
        node = self.root
        while True:
            ind = _getbits(newnode.index, level)
            level += 1
            child = node.children[ind]
            if child is None or child.index == newnode.index:
                if child:
                    assert child.value == newnode.value
                node.children[ind] = newnode
                break
            elif child.index == _root_index:
                # This is a branch
                node = child
            else:
                branch = LookupTreeNode()
                nind = _getbits(newnode.index, level)
                cind = _getbits(child.index, level)
                node.children[ind] = branch

                # Life gets tricky when...
                if nind == cind:
                    branch.children[cind] = child
                    # recurse
                    node = branch
                else:
                    branch.children[nind] = newnode
                    branch.children[cind] = child
                    break
829413
def StartElement(self, name, attributes):
        '''
        
        '''
        if name == 'hierarchy':
            pass
        elif name == 'node':
            # Instantiate an Element object
            attributes['uniqueId'] = 'id/no_id/%d' % self.idCount
            bounds = re.split('[\][,]', attributes['bounds'])
            attributes['bounds'] = ((int(bounds[1]), int(bounds[2])), (int(bounds[4]), int(bounds[5])))
            if DEBUG_BOUNDS:
                print >> sys.stderr, "bounds=", attributes['bounds']
            self.idCount += 1
            child = View.factory(attributes, self.device, version=self.version, uiAutomatorHelper=self.uiAutomatorHelper)
            self.views.append(child)
            # Push element onto the stack and make it a child of parent
            if not self.nodeStack:
                self.root = child
            else:
                self.parent = self.nodeStack[-1]
                self.parent.add(child)
            self.nodeStack.append(child)
582640
def add_child(self, child):
        ''''''
        super(RootNode, self).add_child(child)
        child.attr_wrapper = self.attr_wrapper
658058
function _buildTree(&$tree, &$element) {
        $tree[$element->name()] = $element;
        if ($element->superclass()) {
            $rootDoc = & $this->_doclet->rootDoc();
            $superclass = & $rootDoc->classNamed($element->superclass());
            if ($superclass) {
                $this->_buildTree($tree, $superclass);
            }
        }
    }
36053
protected void appendElement(StringBuilder sb, Element aNode) {
        sb.append("<")
            .append(aNode.getNodeName()).append("...")
            .append(">");
    }
984591
private void adaptForInsert(final ITreeData paramNewNode, final boolean addAsFirstChild) throws TTException {
        assert paramNewNode != null;

        if (paramNewNode instanceof ITreeStructData) {
            final ITreeStructData strucNode = (ITreeStructData)paramNewNode;
            final ITreeStructData parent = (ITreeStructData)getPtx().getData(paramNewNode.getParentKey());
            parent.incrementChildCount();
            if (addAsFirstChild) {
                parent.setFirstChildKey(paramNewNode.getDataKey());
            }
            getPtx().setData(parent);

            if (strucNode.hasRightSibling()) {
                final ITreeStructData rightSiblingNode =
                    (ITreeStructData)getPtx().getData(strucNode.getRightSiblingKey());
                rightSiblingNode.setLeftSiblingKey(paramNewNode.getDataKey());
                getPtx().setData(rightSiblingNode);
            }
            if (strucNode.hasLeftSibling()) {
                final ITreeStructData leftSiblingNode =
                    (ITreeStructData)getPtx().getData(strucNode.getLeftSiblingKey());
                leftSiblingNode.setRightSiblingKey(paramNewNode.getDataKey());
                getPtx().setData(leftSiblingNode);
            }
        }

    }
185725
protected function insertNode()
    {
        $descendant = $this->getKey();
        $ancestor = (isset($this->parent_id) ? $this->parent_id : $descendant);

        $this->closure->insertNode($ancestor, $descendant);
    }
888762
public void add(E element) {
        if (element == null) throw new NullPointerException();

        if (root == null) {
            root = new MutableNode<>(element);
        } else {
            MutableNode<E> node = root;
            while (!node.getElement().equals(element)) {
                int distance = distance(node.getElement(), element);

                MutableNode<E> parent = node;
                node = parent.childrenByDistance.get(distance);
                if (node == null) {
                    node = new MutableNode<>(element);
                    parent.childrenByDistance.put(distance, node);
                    break;
                }
            }
        }
    }
323804
def populate_tree(self, master, parent, element,from_file=False):
        """"""

        data = WidgetDescr(None, None)
        data.from_xml_node(element)
        cname = data.get_class()
        uniqueid = self.get_unique_id(cname, data.get_id())
        data.set_property('id', uniqueid)

        if cname in builder.CLASS_MAP:
            pwidget = self._insert_item(master, data,from_file=from_file)
            xpath = "./child"
            children = element.findall(xpath)
            for child in children:
                child_object = child.find('./object')
                cwidget = self.populate_tree(pwidget, child, child_object,from_file=from_file)

            return pwidget
        else:
            raise Exception('Class "{0}" not mapped'.format(cname))