text:
/*
 * XML Type:  CT_OfPieChart
 * Namespace: http://schemas.openxmlformats.org/drawingml/2006/chart
 * Java type: org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieChart
 *
 * Automatically generated - do not modify.
 */
package org.openxmlformats.schemas.drawingml.x2006.chart.impl;

import javax.xml.namespace.QName;
import org.apache.xmlbeans.QNameSet;

/**
 * An XML CT_OfPieChart(@http://schemas.openxmlformats.org/drawingml/2006/chart).
 *
 * This is a complex type.
 */
public class CTOfPieChartImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieChart {
    private static final long serialVersionUID = 1L;

    public CTOfPieChartImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }

    private static final QName[] PROPERTY_QNAME = {
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "ofPieType"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "varyColors"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "ser"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "dLbls"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "gapWidth"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "splitType"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "splitPos"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "custSplit"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "secondPieSize"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "serLines"),
        new QName("http://schemas.openxmlformats.org/drawingml/2006/chart", "extLst"),
    };

    /**
     * Gets the "ofPieType" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType getOfPieType() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType)get_store().find_element_user(PROPERTY_QNAME[0], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * Sets the "ofPieType" element
     */
    @Override
    public void setOfPieType(org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType ofPieType) {
        generatedSetterHelperImpl(ofPieType, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "ofPieType" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType addNewOfPieType() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTOfPieType)get_store().add_element_user(PROPERTY_QNAME[0]);
            return target;
        }
    }

    /**
     * Gets the "varyColors" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean getVaryColors() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean)get_store().find_element_user(PROPERTY_QNAME[1], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "varyColors" element
     */
    @Override
    public boolean isSetVaryColors() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[1]) != 0;
        }
    }

    /**
     * Sets the "varyColors" element
     */
    @Override
    public void setVaryColors(org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean varyColors) {
        generatedSetterHelperImpl(varyColors, PROPERTY_QNAME[1], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "varyColors" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean addNewVaryColors() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean)get_store().add_element_user(PROPERTY_QNAME[1]);
            return target;
        }
    }

    /**
     * Unsets the "varyColors" element
     */
    @Override
    public void unsetVaryColors() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[1], 0);
        }
    }

    /**
     * Gets a List of "ser" elements
     */
    @Override
    public java.util.List<org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer> getSerList() {
        synchronized (monitor()) {
            check_orphaned();
            return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                this::getSerArray,
                this::setSerArray,
                this::insertNewSer,
                this::removeSer,
                this::sizeOfSerArray
            );
        }
    }

    /**
     * Gets array of all "ser" elements
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer[] getSerArray() {
        return getXmlObjectArray(PROPERTY_QNAME[2], new org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer[0]);
    }

    /**
     * Gets ith "ser" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer getSerArray(int i) {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer)get_store().find_element_user(PROPERTY_QNAME[2], i);
            if (target == null) {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }

    /**
     * Returns number of "ser" element
     */
    @Override
    public int sizeOfSerArray() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[2]);
        }
    }

    /**
     * Sets array of all "ser" element  WARNING: This method is not atomicaly synchronized.
     */
    @Override
    public void setSerArray(org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer[] serArray) {
        check_orphaned();
        arraySetterHelper(serArray, PROPERTY_QNAME[2]);
    }

    /**
     * Sets ith "ser" element
     */
    @Override
    public void setSerArray(int i, org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer ser) {
        generatedSetterHelperImpl(ser, PROPERTY_QNAME[2], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
    }

    /**
     * Inserts and returns a new empty value (as xml) as the ith "ser" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer insertNewSer(int i) {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer)get_store().insert_element_user(PROPERTY_QNAME[2], i);
            return target;
        }
    }

    /**
     * Appends and returns a new empty value (as xml) as the last "ser" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer addNewSer() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTPieSer)get_store().add_element_user(PROPERTY_QNAME[2]);
            return target;
        }
    }

    /**
     * Removes the ith "ser" element
     */
    @Override
    public void removeSer(int i) {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[2], i);
        }
    }

    /**
     * Gets the "dLbls" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls getDLbls() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls)get_store().find_element_user(PROPERTY_QNAME[3], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "dLbls" element
     */
    @Override
    public boolean isSetDLbls() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[3]) != 0;
        }
    }

    /**
     * Sets the "dLbls" element
     */
    @Override
    public void setDLbls(org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls dLbls) {
        generatedSetterHelperImpl(dLbls, PROPERTY_QNAME[3], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "dLbls" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls addNewDLbls() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTDLbls)get_store().add_element_user(PROPERTY_QNAME[3]);
            return target;
        }
    }

    /**
     * Unsets the "dLbls" element
     */
    @Override
    public void unsetDLbls() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[3], 0);
        }
    }

    /**
     * Gets the "gapWidth" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount getGapWidth() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount)get_store().find_element_user(PROPERTY_QNAME[4], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "gapWidth" element
     */
    @Override
    public boolean isSetGapWidth() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[4]) != 0;
        }
    }

    /**
     * Sets the "gapWidth" element
     */
    @Override
    public void setGapWidth(org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount gapWidth) {
        generatedSetterHelperImpl(gapWidth, PROPERTY_QNAME[4], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "gapWidth" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount addNewGapWidth() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTGapAmount)get_store().add_element_user(PROPERTY_QNAME[4]);
            return target;
        }
    }

    /**
     * Unsets the "gapWidth" element
     */
    @Override
    public void unsetGapWidth() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[4], 0);
        }
    }

    /**
     * Gets the "splitType" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType getSplitType() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType)get_store().find_element_user(PROPERTY_QNAME[5], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "splitType" element
     */
    @Override
    public boolean isSetSplitType() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[5]) != 0;
        }
    }

    /**
     * Sets the "splitType" element
     */
    @Override
    public void setSplitType(org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType splitType) {
        generatedSetterHelperImpl(splitType, PROPERTY_QNAME[5], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "splitType" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType addNewSplitType() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTSplitType)get_store().add_element_user(PROPERTY_QNAME[5]);
            return target;
        }
    }

    /**
     * Unsets the "splitType" element
     */
    @Override
    public void unsetSplitType() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[5], 0);
        }
    }

    /**
     * Gets the "splitPos" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble getSplitPos() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble)get_store().find_element_user(PROPERTY_QNAME[6], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "splitPos" element
     */
    @Override
    public boolean isSetSplitPos() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[6]) != 0;
        }
    }

    /**
     * Sets the "splitPos" element
     */
    @Override
    public void setSplitPos(org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble splitPos) {
        generatedSetterHelperImpl(splitPos, PROPERTY_QNAME[6], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "splitPos" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble addNewSplitPos() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTDouble)get_store().add_element_user(PROPERTY_QNAME[6]);
            return target;
        }
    }

    /**
     * Unsets the "splitPos" element
     */
    @Override
    public void unsetSplitPos() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[6], 0);
        }
    }

    /**
     * Gets the "custSplit" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit getCustSplit() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit)get_store().find_element_user(PROPERTY_QNAME[7], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "custSplit" element
     */
    @Override
    public boolean isSetCustSplit() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[7]) != 0;
        }
    }

    /**
     * Sets the "custSplit" element
     */
    @Override
    public void setCustSplit(org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit custSplit) {
        generatedSetterHelperImpl(custSplit, PROPERTY_QNAME[7], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "custSplit" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit addNewCustSplit() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTCustSplit)get_store().add_element_user(PROPERTY_QNAME[7]);
            return target;
        }
    }

    /**
     * Unsets the "custSplit" element
     */
    @Override
    public void unsetCustSplit() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[7], 0);
        }
    }

    /**
     * Gets the "secondPieSize" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize getSecondPieSize() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize)get_store().find_element_user(PROPERTY_QNAME[8], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "secondPieSize" element
     */
    @Override
    public boolean isSetSecondPieSize() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[8]) != 0;
        }
    }

    /**
     * Sets the "secondPieSize" element
     */
    @Override
    public void setSecondPieSize(org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize secondPieSize) {
        generatedSetterHelperImpl(secondPieSize, PROPERTY_QNAME[8], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "secondPieSize" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize addNewSecondPieSize() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTSecondPieSize)get_store().add_element_user(PROPERTY_QNAME[8]);
            return target;
        }
    }

    /**
     * Unsets the "secondPieSize" element
     */
    @Override
    public void unsetSecondPieSize() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[8], 0);
        }
    }

    /**
     * Gets a List of "serLines" elements
     */
    @Override
    public java.util.List<org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines> getSerLinesList() {
        synchronized (monitor()) {
            check_orphaned();
            return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                this::getSerLinesArray,
                this::setSerLinesArray,
                this::insertNewSerLines,
                this::removeSerLines,
                this::sizeOfSerLinesArray
            );
        }
    }

    /**
     * Gets array of all "serLines" elements
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines[] getSerLinesArray() {
        return getXmlObjectArray(PROPERTY_QNAME[9], new org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines[0]);
    }

    /**
     * Gets ith "serLines" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines getSerLinesArray(int i) {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines)get_store().find_element_user(PROPERTY_QNAME[9], i);
            if (target == null) {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }

    /**
     * Returns number of "serLines" element
     */
    @Override
    public int sizeOfSerLinesArray() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[9]);
        }
    }

    /**
     * Sets array of all "serLines" element  WARNING: This method is not atomicaly synchronized.
     */
    @Override
    public void setSerLinesArray(org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines[] serLinesArray) {
        check_orphaned();
        arraySetterHelper(serLinesArray, PROPERTY_QNAME[9]);
    }

    /**
     * Sets ith "serLines" element
     */
    @Override
    public void setSerLinesArray(int i, org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines serLines) {
        generatedSetterHelperImpl(serLines, PROPERTY_QNAME[9], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
    }

    /**
     * Inserts and returns a new empty value (as xml) as the ith "serLines" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines insertNewSerLines(int i) {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines)get_store().insert_element_user(PROPERTY_QNAME[9], i);
            return target;
        }
    }

    /**
     * Appends and returns a new empty value (as xml) as the last "serLines" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines addNewSerLines() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines)get_store().add_element_user(PROPERTY_QNAME[9]);
            return target;
        }
    }

    /**
     * Removes the ith "serLines" element
     */
    @Override
    public void removeSerLines(int i) {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[9], i);
        }
    }

    /**
     * Gets the "extLst" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList getExtLst() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList)get_store().find_element_user(PROPERTY_QNAME[10], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "extLst" element
     */
    @Override
    public boolean isSetExtLst() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[10]) != 0;
        }
    }

    /**
     * Sets the "extLst" element
     */
    @Override
    public void setExtLst(org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList extLst) {
        generatedSetterHelperImpl(extLst, PROPERTY_QNAME[10], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "extLst" element
     */
    @Override
    public org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList addNewExtLst() {
        synchronized (monitor()) {
            check_orphaned();
            org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList target = null;
            target = (org.openxmlformats.schemas.drawingml.x2006.chart.CTExtensionList)get_store().add_element_user(PROPERTY_QNAME[10]);
            return target;
        }
    }

    /**
     * Unsets the "extLst" element
     */
    @Override
    public void unsetExtLst() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[10], 0);
        }
    }
}


text:
title: Radicals Introduction and Simplification
localeTitle: Introducción y simplificación de los radicales.
---
## Introducción y simplificación de los radicales.

Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/mathematics/radicals-introduction-and-simplification/index.md) .

[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .

#### Más información:

redpajama_set_name: RedPajamaGithub


text:
#include "libmfx_allocator.h"

#include "mfxvideo++int.h"

#include "ippcore.h"
#include "ipps.h"

#include "mfx_utils.h"

#define ALIGN32(X) (((mfxU32)((X)+31)) & (~ (mfxU32)31))
#define ID_BUFFER MFX_MAKEFOURCC('B','U','F','F')
#define ID_FRAME  MFX_MAKEFOURCC('F','R','M','E')

#define ERROR_STATUS(sts) ((sts)<MFX_ERR_NONE)

// Implementation of Internal allocators
mfxStatus mfxDefaultAllocator::AllocBuffer(mfxHDL pthis, mfxU32 nbytes, mfxU16 type, mfxHDL *mid)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    mfxU32 header_size = ALIGN32(sizeof(BufferStruct));
    mfxU8 *buffer_ptr=(mfxU8 *)ippMalloc(header_size + nbytes);

    if (!buffer_ptr)
        return MFX_ERR_MEMORY_ALLOC;

    memset(buffer_ptr, 0, header_size + nbytes);

    BufferStruct *bs=(BufferStruct *)buffer_ptr;
    bs->allocator = pthis;
    bs->id = ID_BUFFER;
    bs->type = type;
    bs->nbytes = nbytes;

    // save index
    {
        mfxWideBufferAllocator* pBA = (mfxWideBufferAllocator*)pthis;
        pBA->m_bufHdl.push_back(bs);
        *mid = (mfxHDL) pBA->m_bufHdl.size();
    }

    return MFX_ERR_NONE;

}

inline
size_t midToSizeT(mfxHDL mid)
{
    return ((Ipp8u *) mid - (Ipp8u *) 0);

} // size_t midToSizeT(mfxHDL mid)

mfxStatus mfxDefaultAllocator::LockBuffer(mfxHDL pthis, mfxHDL mid, mfxU8 **ptr)
{
    //BufferStruct *bs=(BufferStruct *)mid;
    BufferStruct *bs;
    try
    {
        size_t index = midToSizeT(mid);
        if (!pthis)
            return MFX_ERR_INVALID_HANDLE;

        mfxWideBufferAllocator* pBA = (mfxWideBufferAllocator*)pthis;
        if ((index > pBA->m_bufHdl.size())||
            (index == 0))
            return MFX_ERR_INVALID_HANDLE;
        bs = pBA->m_bufHdl[index - 1];
    }
    catch (...)
    {
        return MFX_ERR_INVALID_HANDLE;
    }

    if (ptr) *ptr=(mfxU8 *)bs+ALIGN32(sizeof(BufferStruct));
    return MFX_ERR_NONE;
}
mfxStatus mfxDefaultAllocator::UnlockBuffer(mfxHDL pthis, mfxHDL mid)
{
    try
    {
        if (!pthis)
            return MFX_ERR_INVALID_HANDLE;

        BufferStruct *bs;
        size_t index = midToSizeT(mid);
        mfxWideBufferAllocator* pBA = (mfxWideBufferAllocator*)pthis;
        if (index > pBA->m_bufHdl.size())
            return MFX_ERR_INVALID_HANDLE;

        bs = pBA->m_bufHdl[index - 1];
        if (bs->id!=ID_BUFFER)
            return MFX_ERR_INVALID_HANDLE;
    }
    catch (...)
    {
        return MFX_ERR_INVALID_HANDLE;
    }

    return MFX_ERR_NONE;
}
mfxStatus mfxDefaultAllocator::FreeBuffer(mfxHDL pthis, mfxMemId mid)
{
    try
    {
        if (!pthis)
            return MFX_ERR_INVALID_HANDLE;
        BufferStruct *bs;
        size_t index = midToSizeT(mid);
        mfxWideBufferAllocator* pBA = (mfxWideBufferAllocator*)pthis;
        if (index > pBA->m_bufHdl.size())
            return MFX_ERR_INVALID_HANDLE;

        bs = pBA->m_bufHdl[index - 1];
        if (bs->id!=ID_BUFFER)
            return MFX_ERR_INVALID_HANDLE;
        if (bs->id!=ID_BUFFER)
            return MFX_ERR_INVALID_HANDLE;
        ippFree(bs);
        return MFX_ERR_NONE;
    }
    catch (...)
    {
        return MFX_ERR_INVALID_HANDLE;
    }
}
mfxStatus mfxDefaultAllocator::AllocFrames(mfxHDL pthis, mfxFrameAllocRequest *request, mfxFrameAllocResponse *response)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    mfxU32 numAllocated, maxNumFrames;
    mfxWideSWFrameAllocator *pSelf = (mfxWideSWFrameAllocator*)pthis;

    // frames were allocated
    // return existent frames
    if (pSelf->NumFrames)
    {
        if (request->NumFrameSuggested > pSelf->NumFrames)
            return MFX_ERR_MEMORY_ALLOC;
        else
        {
            response->mids = &pSelf->m_frameHandles[0];
            return MFX_ERR_NONE;
        }
    }

    mfxU32 Pitch=ALIGN32(request->Info.Width);
    mfxU32 Height2=ALIGN32(request->Info.Height);
    mfxU32 nbytes;
    // Decoders and Encoders use YV12 and NV12 only
    switch (request->Info.FourCC) {
    case MFX_FOURCC_YV12:
        nbytes=Pitch*Height2 + (Pitch>>1)*(Height2>>1) + (Pitch>>1)*(Height2>>1);
        break;
    case MFX_FOURCC_NV12:
        nbytes=Pitch*Height2 + (Pitch>>1)*(Height2>>1) + (Pitch>>1)*(Height2>>1);
        break;
    case MFX_FOURCC_P010:
        Pitch=ALIGN32(request->Info.Width*2);
        nbytes=Pitch*Height2 + (Pitch>>1)*(Height2>>1) + (Pitch>>1)*(Height2>>1);
        break;
    case MFX_FOURCC_YUY2:
        nbytes=Pitch*Height2 + (Pitch>>1)*(Height2) + (Pitch>>1)*(Height2);
        break;
    case MFX_FOURCC_RGB3:
        if ((request->Type & MFX_MEMTYPE_FROM_VPPIN) ||
            (request->Type & MFX_MEMTYPE_FROM_VPPOUT) )
        {
            nbytes = Pitch*Height2 + Pitch*Height2 + Pitch*Height2;
            break;
        }
        else
            return MFX_ERR_UNSUPPORTED;
    case MFX_FOURCC_RGB4:
        nbytes = Pitch*Height2 + Pitch*Height2 + Pitch*Height2 + Pitch*Height2;
        break;
    case MFX_FOURCC_A2RGB10:
        nbytes = Pitch*Height2 + Pitch*Height2 + Pitch*Height2 + Pitch*Height2;
        break;
    case MFX_FOURCC_IMC3:
        if ((request->Type & MFX_MEMTYPE_FROM_VPPIN) ||
            (request->Type & MFX_MEMTYPE_FROM_VPPOUT) ||
            (request->Type & MFX_MEMTYPE_FROM_DECODE))
        {
            nbytes = Pitch*Height2 + (Pitch)*(Height2>>1) + (Pitch)*(Height2>>1);
            break;
        }
        else
            return MFX_ERR_UNSUPPORTED;
        break;

    case MFX_FOURCC_P8: // MBdata for ENC
        if ( request->Type & MFX_MEMTYPE_FROM_ENCODE )
        {
            nbytes = Pitch*Height2;
            break;
        }
        else
            return MFX_ERR_UNSUPPORTED;

    default:
        return MFX_ERR_UNSUPPORTED;
    }

    // allocate frames in cycle
    maxNumFrames = request->NumFrameSuggested;
    pSelf->m_frameHandles.resize(request->NumFrameSuggested);
    for (numAllocated = 0; numAllocated < maxNumFrames; numAllocated += 1)
    {
        mfxStatus sts = (pSelf->wbufferAllocator.bufferAllocator.Alloc)(pSelf->wbufferAllocator.bufferAllocator.pthis, nbytes + ALIGN32(sizeof(FrameStruct)), request->Type, &pSelf->m_frameHandles[numAllocated]);
        if (ERROR_STATUS(sts)) break;

        FrameStruct *fs;
        sts = (pSelf->wbufferAllocator.bufferAllocator.Lock)(pSelf->wbufferAllocator.bufferAllocator.pthis, pSelf->m_frameHandles[numAllocated], (mfxU8 **)&fs);
        if (ERROR_STATUS(sts)) break;
        fs->id = ID_FRAME;
        fs->info = request->Info;
        (pSelf->wbufferAllocator.bufferAllocator.Unlock)(pSelf->wbufferAllocator.bufferAllocator.pthis, pSelf->m_frameHandles[numAllocated]);
    }
    response->mids = &pSelf->m_frameHandles[0];
    response->NumFrameActual = (mfxU16) numAllocated;

    // check the number of allocated frames
    if (numAllocated < request->NumFrameMin)
    {
        FreeFrames(pSelf->wbufferAllocator.bufferAllocator.pthis, response);
        return MFX_ERR_MEMORY_ALLOC;
    }
    pSelf->NumFrames = maxNumFrames;

    return MFX_ERR_NONE;

}

mfxStatus mfxDefaultAllocator::LockFrame(mfxHDL pthis, mfxHDL mid, mfxFrameData *ptr)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    mfxWideSWFrameAllocator *pSelf = (mfxWideSWFrameAllocator*)pthis;

    // The default LockFrame is to simulate using LockBuffer.
    FrameStruct *fs;
    mfxStatus sts = (pSelf->wbufferAllocator.bufferAllocator.Lock)(pSelf->wbufferAllocator.bufferAllocator.pthis, mid,(mfxU8 **)&fs);
    if (ERROR_STATUS(sts)) return sts;
    if (fs->id!=ID_FRAME)
    {
        (pSelf->wbufferAllocator.bufferAllocator.Unlock)(pSelf->wbufferAllocator.bufferAllocator.pthis, mid);
        return MFX_ERR_INVALID_HANDLE;
    }

    //ptr->MemId = mid; !!!!!!!!!!!!!!!!!!!!!!!!!
    mfxU32 Height2=ALIGN32(fs->info.Height);
    mfxU8 *sptr = (mfxU8 *)fs+ALIGN32(sizeof(FrameStruct));
    switch (fs->info.FourCC) {
    case MFX_FOURCC_NV12:
        ptr->PitchHigh=0;
        ptr->PitchLow=(mfxU16)ALIGN32(fs->info.Width);
        ptr->Y = sptr;
        ptr->U = ptr->Y + ptr->Pitch*Height2;
        ptr->V = ptr->U + 1;
        break;
    case MFX_FOURCC_P010:
        ptr->PitchHigh=0;
        ptr->PitchLow=(mfxU16)ALIGN32(fs->info.Width*2);
        ptr->Y = sptr;
        ptr->U = ptr->Y + ptr->Pitch*Height2;
        ptr->V = ptr->U + 1;
        break;
    case MFX_FOURCC_YV12:
        ptr->PitchHigh=0;
        ptr->PitchLow=(mfxU16)ALIGN32(fs->info.Width);
        ptr->Y = sptr;
        ptr->V = ptr->Y + ptr->Pitch*Height2;
        ptr->U = ptr->V + (ptr->Pitch>>1)*(Height2>>1);
        break;
    case MFX_FOURCC_YUY2:
        ptr->Y = sptr;
        ptr->U = ptr->Y + 1;
        ptr->V = ptr->Y + 3;
        ptr->PitchHigh = (mfxU16)((2*ALIGN32(fs->info.Width)) / (1 << 16));
        ptr->PitchLow  = (mfxU16)((2*ALIGN32(fs->info.Width)) % (1 << 16));
        break;
    case MFX_FOURCC_RGB3:
        ptr->B = sptr;
        ptr->G = ptr->B + 1;
        ptr->R = ptr->B + 2;
        ptr->PitchHigh = (mfxU16)((3*ALIGN32(fs->info.Width)) / (1 << 16));
        ptr->PitchLow  = (mfxU16)((3*ALIGN32(fs->info.Width)) % (1 << 16));
        break;
    case MFX_FOURCC_RGB4:
    case MFX_FOURCC_A2RGB10:
        ptr->B = sptr;
        ptr->G = ptr->B + 1;
        ptr->R = ptr->B + 2;
        ptr->A = ptr->B + 3;
        ptr->PitchHigh = (mfxU16)((4*ALIGN32(fs->info.Width)) / (1 << 16));
        ptr->PitchLow  = (mfxU16)((4*ALIGN32(fs->info.Width)) % (1 << 16));
        break;
    /*case MFX_FOURCC_IMC3:
        ptr->Pitch = (mfxU16)ALIGN32(fs->info.Width);
        ptr->Y = sptr;
        ptr->U = ptr->Y +  ptr->Pitch*Height2;
        ptr->V = ptr->U + (ptr->Pitch)*(Height2>>1);
        break;*/
    case MFX_FOURCC_P8:
        ptr->PitchHigh=0;
        ptr->PitchLow=(mfxU16)ALIGN32(fs->info.Width);
        ptr->Y = sptr;
        ptr->U = 0;
        ptr->V = 0;
        break;
    default:
        return MFX_ERR_UNSUPPORTED;
    }
    return sts;

}
mfxStatus mfxDefaultAllocator::GetHDL(mfxHDL pthis, mfxMemId mid, mfxHDL *handle)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    *handle = mid;
    return MFX_ERR_NONE;
}

mfxStatus mfxDefaultAllocator::UnlockFrame(mfxHDL pthis, mfxHDL mid, mfxFrameData *ptr)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    mfxWideSWFrameAllocator *pSelf = (mfxWideSWFrameAllocator*)pthis;

    // The default UnlockFrame behavior is to simulate using UnlockBuffer
    mfxStatus sts = (pSelf->wbufferAllocator.bufferAllocator.Unlock)(pSelf->wbufferAllocator.bufferAllocator.pthis, mid);
    if (ERROR_STATUS(sts)) return sts;
    if (ptr) {
        ptr->PitchHigh=0;
        ptr->PitchLow=0;
        ptr->U=ptr->V=ptr->Y=0;
        ptr->A=ptr->R=ptr->G=ptr->B=0;
    }
    return sts;

} // mfxStatus SWVideoCORE::UnlockFrame(mfxHDL mid, mfxFrameData *ptr)
mfxStatus mfxDefaultAllocator::FreeFrames(mfxHDL pthis, mfxFrameAllocResponse *response)
{
    if (!pthis)
        return MFX_ERR_INVALID_HANDLE;

    mfxWideSWFrameAllocator *pSelf = (mfxWideSWFrameAllocator*)pthis;
    mfxU32 i;
    // free all allocated frames in cycle
    for (i = 0; i < response->NumFrameActual; i += 1)
    {
        if (response->mids[i])
        {
            (pSelf->wbufferAllocator.bufferAllocator.Free)(pSelf->wbufferAllocator.bufferAllocator.pthis, response->mids[i]);
        }
    }

    pSelf->m_frameHandles.clear();

    return MFX_ERR_NONE;

} // mfxStatus SWVideoCORE::FreeFrames(void)

mfxWideBufferAllocator::mfxWideBufferAllocator()
{
    memset(bufferAllocator.reserved, 0, sizeof(bufferAllocator.reserved));

    bufferAllocator.Alloc = &mfxDefaultAllocator::AllocBuffer;
    bufferAllocator.Lock =  &mfxDefaultAllocator::LockBuffer;
    bufferAllocator.Unlock = &mfxDefaultAllocator::UnlockBuffer;
    bufferAllocator.Free = &mfxDefaultAllocator::FreeBuffer;

    bufferAllocator.pthis = 0;
}

mfxWideBufferAllocator::~mfxWideBufferAllocator()
{
    memset((void*)&bufferAllocator, 0, sizeof(mfxBufferAllocator));
}
mfxBaseWideFrameAllocator::mfxBaseWideFrameAllocator(mfxU16 type)
    : NumFrames(0)
    , type(type)
{
    memset((void*)&frameAllocator, 0, sizeof(frameAllocator));

}
mfxBaseWideFrameAllocator::~mfxBaseWideFrameAllocator()
{
    memset((void*)&frameAllocator, 0, sizeof(mfxFrameAllocator));
}
mfxWideSWFrameAllocator::mfxWideSWFrameAllocator(mfxU16 type):mfxBaseWideFrameAllocator(type)
{
    frameAllocator.Alloc = &mfxDefaultAllocator::AllocFrames;
    frameAllocator.Lock = &mfxDefaultAllocator::LockFrame;
    frameAllocator.GetHDL = &mfxDefaultAllocator::GetHDL;
    frameAllocator.Unlock = &mfxDefaultAllocator::UnlockFrame;
    frameAllocator.Free = &mfxDefaultAllocator::FreeFrames;
}


text:
from Tkinter import Tk
from titleScreen import TitleScreen
import sound

sound.init(
    music="Korobeiniki.mid",
    sounds = "lock_in rotate pause line_clear game_lost".split()
)

root = Tk()
root.wm_title("Falling Block Game")

root.bind("<Escape>", lambda event: root.destroy())

g = TitleScreen(root)

g.pack()
g.start()

root.mainloop()


text:
/*
 * |============================================================| |- Project:
 * SampleCode -| |- File: Log4jDemo.java -| |- Date: Sep 30, 2015 -| |- Author:
 * timsiwula -| |- Description: This file servers the purpose of ... . -|
 * |============================================================|
 */

/**
 *
 */

package debugging;

import java.util.logging.LogManager;
import java.util.logging.Logger;

/**
 * This class demonstrates very basic logging using Log4j2. It is accompanied by
 * the log4j2.xml configuration file.
 */
public class Log4jDemo
{
	private static final Logger rootLogger = LogManager.getRootLogger();
	private static final Logger outerLogger = LogManager.getLogger(Log4jDemo.class);

	public static void testOuter()
	{
		outerLogger.trace("Outer Trace");
		outerLogger.debug("Outer Debug");
		outerLogger.info("Outer Info");
		outerLogger.warn("Outer Warn");
		outerLogger.error("Outer Error");
		outerLogger.fatal("Outer Fatal");
	}

	public static void testRoot()
	{
		rootLogger.trace("Root Trace");
		rootLogger.debug("Root Debug");
		rootLogger.info("Root Info");
		rootLogger.warn("Root Warn");
		rootLogger.error("Root Error");
		rootLogger.fatal("Root Fatal");
	}

	public static class Inner
	{
		private static Logger innerLogger = LogManager.getLogger(Log4jDemo.Inner.class);

		public static void testInner()
		{
			innerLogger.trace("Inner Trace");
			innerLogger.debug("Inner Debug");
			innerLogger.info("Inner Info");
			innerLogger.warn("Inner Warn");
			innerLogger.error("Inner Error");
			innerLogger.fatal("Inner Fatal");
		}
	}

	public static void main(String[] args)
	{
		testRoot();
		System.out.println();

		testOuter();
		System.out.println();

		Inner.testInner();
	}
}


text:
require 'tender/discussion'

module Tender
  class Client

    attr_accessor :domain, :api_token, :password, :host_format, :domain_format, :protocol, :port

    def initialize(domain, api_token)
      self.domain = domain # 'tender-api-testing'
      self.api_token = api_token # 'b19343da7748bd4e97d13fcc8b76304a039eb801'
    end

    def connection
      @conn ||= Faraday.new(url: "https://api.tenderapp.com/#{self.domain}" ) do |faraday|
        faraday.use FaradayMiddleware::EncodeJson
        faraday.use FaradayMiddleware::ParseJson, :content_type => /\bjson$/
        faraday.adapter Faraday.default_adapter
      end
      @conn.headers['Accept'] = "application/vnd.tender-v1+json"
      @conn.headers['X-Tender-Auth'] = self.api_token
      @conn
    end

    include Tender::Discussion
  end
end


text:
package org.finra.herd.dao.impl;

import static org.springframework.ldap.query.LdapQueryBuilder.query;

import java.util.List;

import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;

import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ldap.core.AttributesMapper;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.stereotype.Repository;

import org.finra.herd.core.helper.ConfigurationHelper;
import org.finra.herd.dao.LdapOperations;
import org.finra.herd.dao.SubjectMatterExpertDao;
import org.finra.herd.model.api.xml.SubjectMatterExpertContactDetails;
import org.finra.herd.model.api.xml.SubjectMatterExpertKey;
import org.finra.herd.model.dto.ConfigurationValue;

@Repository
public class SubjectMatterExpertDaoImpl implements SubjectMatterExpertDao
{
    @Autowired
    private ConfigurationHelper configurationHelper;

    @Autowired
    private LdapOperations ldapOperations;

    @Autowired
    private LdapTemplate ldapTemplate;

    @Override
    public SubjectMatterExpertContactDetails getSubjectMatterExpertByKey(SubjectMatterExpertKey subjectMatterExpertKey)
    {
        List<SubjectMatterExpertContactDetails> subjectMatterExpertContactDetailsList = ldapOperations.search(ldapTemplate,
            query().where(configurationHelper.getProperty(ConfigurationValue.LDAP_ATTRIBUTE_USER_ID)).is(subjectMatterExpertKey.getUserId()),
            new SubjectMatterExpertContactDetailsMapper(configurationHelper.getProperty(ConfigurationValue.LDAP_ATTRIBUTE_USER_FULL_NAME),
                configurationHelper.getProperty(ConfigurationValue.LDAP_ATTRIBUTE_USER_JOB_TITLE),
                configurationHelper.getProperty(ConfigurationValue.LDAP_ATTRIBUTE_USER_EMAIL_ADDRESS),
                configurationHelper.getProperty(ConfigurationValue.LDAP_ATTRIBUTE_USER_TELEPHONE_NUMBER)));

        return CollectionUtils.isNotEmpty(subjectMatterExpertContactDetailsList) ? subjectMatterExpertContactDetailsList.get(0) : null;
    }

    private static class SubjectMatterExpertContactDetailsMapper implements AttributesMapper<SubjectMatterExpertContactDetails>
    {
        /**
         * The LDAP attribute id for user's e-mail address
         */
        private String userEmailAddressAttribute;

        /**
         * The LDAP attribute id for user's full name
         */
        private String userFullNameAttribute;

        /**
         * The LDAP attribute id for user's job title
         */
        private String userJobTitleAttribute;

        /**
         * The LDAP attribute id for user's telephone number
         */
        private String userTelephoneNumberAttribute;

        /**
         * Fully-initialising value constructor.
         *
         * @param userFullNameAttribute the LDAP attribute id for user's full name
         * @param userJobTitleAttribute the LDAP attribute id for user's job title
         * @param userEmailAddressAttribute the LDAP attribute id for user's e-mail address
         * @param userTelephoneNumberAttribute the LDAP attribute id for user's telephone number
         */
        public SubjectMatterExpertContactDetailsMapper(String userFullNameAttribute, String userJobTitleAttribute, String userEmailAddressAttribute,
            String userTelephoneNumberAttribute)
        {
            this.userFullNameAttribute = userFullNameAttribute;
            this.userJobTitleAttribute = userJobTitleAttribute;
            this.userEmailAddressAttribute = userEmailAddressAttribute;
            this.userTelephoneNumberAttribute = userTelephoneNumberAttribute;
        }

        /**
         * Map Attributes to a subject matter expert details object. The supplied attributes are the attributes from a single search result.
         *
         * @param attributes the attributes from a search result
         */
        public SubjectMatterExpertContactDetails mapFromAttributes(Attributes attributes) throws NamingException
        {
            SubjectMatterExpertContactDetails subjectMatterExpertContactDetails = new SubjectMatterExpertContactDetails();
            subjectMatterExpertContactDetails.setFullName(getAttributeById(attributes, userFullNameAttribute));
            subjectMatterExpertContactDetails.setJobTitle(getAttributeById(attributes, userJobTitleAttribute));
            subjectMatterExpertContactDetails.setEmailAddress(getAttributeById(attributes, userEmailAddressAttribute));
            subjectMatterExpertContactDetails.setTelephoneNumber(getAttributeById(attributes, userTelephoneNumberAttribute));
            return subjectMatterExpertContactDetails;
        }

        /**
         * Retrieves a single attribute value from attributes per specified attribute id.
         *
         * @param attributes the attributes from a search result
         * @param attributeId the attribute id
         *
         * @return the value of the attribute, or null if attribute value is not present
         */
        private String getAttributeById(Attributes attributes, String attributeId) throws NamingException
        {
            String attributeValue = null;

            Attribute attribute = attributes.get(attributeId);
            if (attribute != null)
            {
                attributeValue = (String) attribute.get();
            }

            return attributeValue;
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- This model was created online using SPLOT's Feature Model Editor (http://www.splot-research.org) on Sat, May 23, 2015 - 5:52 PM  --><feature_model name="Heidelberg Ion-Beam Therapy Center">
<meta>
<data name="description">Software system of a complex medical device of radiotherapy.</data>
<data name="creator">Jefferson da Silva Barbosa</data>
<data name="address"/>
<data name="email">jefferson.sb.es@gmail.com</data>
<data name="phone"/>
<data name="website"/>
<data name="organization">Universidade Federal do Ceará</data>
<data name="department"/>
<data name="date">23-05-2015</data>
<data name="reference"/>
</meta>

<context name="operation-mode">
<resolution feature="DCUMasterParameter" id="_r_1" status="true"/>
<resolution feature="MeasuringMode" id="_r_1_2" status="true"/>
<resolution feature="AddRtbDelayTime" id="_r_1_11" status="true"/>
<resolution feature="LowCurrentTimer" id="_r_1_12" status="true"/>
<resolution feature="DCUTypeParameter" id="_r_13" status="true"/>
<resolution feature="Name" id="_r_13_14" status="true"/>
<resolution feature="DeviceControlParameter" id="_r_13_15" status="false"/>
<resolution feature="RefValueTHoldMax" id="_r_13_15_16" status="false"/>
<resolution feature="TimeoutFeedback" id="_r_13_15_17" status="false"/>
<resolution feature="DelayTimeFeedback" id="_r_13_15_18" status="false"/>
<resolution feature="DelayTimeActivate" id="_r_13_15_19" status="false"/>
<resolution feature="BeamRequest" id="_r_13_15_20" status="false"/>
<resolution feature="EnableShutdown" id="_r_13_15_21" status="false"/>
<resolution feature="EnableSwitchOn" id="_r_13_15_22" status="false"/>
<resolution feature="Checksum" id="_r_13_23" status="true"/>
<resolution feature="Version" id="_r_13_24" status="true"/>
<resolution feature="OperationMode" id="_r_26" status="true"/>
<resolution feature="DeviceController" id="_r_35" status="true"/>
<resolution feature="Type" id="_r_36" status="true"/>
<resolution feature="Therapy" id="_r_26_27_32" status="true"/>
<resolution feature="EnableSyncSupplyFequence" id="_r_13_25_51" status="true"/>
<resolution feature="QualityAssurance" id="_r_26_27_28" status="false"/>
<resolution feature="Adjustment" id="_r_26_27_29" status="false"/>
<resolution feature="Experiment" id="_r_26_27_30" status="false"/>
<resolution feature="Standby" id="_r_26_27_31" status="false"/>
<resolution feature="Manual" id="_r_26_27_33" status="false"/>
<resolution feature="Idle" id="_r_26_27_34" status="false"/>
<resolution feature="TimingMasterParameter" id="_r_13_25" status="true"/>
<resolution feature="Z" id="_r_36_37_38" status="true"/>
<resolution feature="SD" id="_r_36_37_39" status="false"/>
<resolution feature="DeviceControl" id="_r_36_37_40" status="false"/>
<resolution feature="Ramped" id="_r_36_37_40_41_42" status="false"/>
<resolution feature="P" id="_r_36_37_40_41_43" status="false"/>
<resolution feature="T" id="_r_36_37_40_41_44" status="false"/>
<resolution feature="TS" id="_r_36_37_40_41_45" status="false"/>
<resolution feature="RK" id="_r_36_37_40_41_42_46_47" status="false"/>
<resolution feature="RB" id="_r_36_37_40_41_42_46_48" status="false"/>
<resolution feature="R" id="_r_36_37_40_41_42_46_49" status="false"/>
<constraints>
<constraint>~_r_26_27_32 or _r_13_25_51</constraint>
</constraints>
</context>
<context name="ahsdias">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<constraints>
<constraint>_r_35 or ~_r_36</constraint>
</constraints>
</context>
<context name="asd">
<resolution feature="Mode4" id="_r_1_2_3_4" status="true"/>
<constraints/>
</context>
<context name="asd">
<resolution feature="Mode4" id="_r_1_2_3_4" status="true"/>
<constraints/>
</context>
<context name="xcv">
<resolution feature="MeasuringMode" id="_r_1_2" status="true"/>
<constraints/>
</context>
<context name="a">
<resolution feature="MeasuringMode" id="_r_1_2" status="true"/>
<constraints/>
</context>
<context name="asd">
<resolution feature="Mode3" id="_r_1_2_3_5" status="true"/>
<constraints/>
</context>
<context name="saf">
<resolution feature="Mode2" id="_r_1_2_3_6" status="true"/>
<constraints/>
</context>
<context name="asd">
<resolution feature="Mode3" id="_r_1_2_3_5" status="true"/>
<constraints/>
</context>
<context name="asd">
<resolution feature="Mode4" id="_r_1_2_3_4" status="true"/>
<constraints/>
</context>
<context name="v">
<resolution feature="Mode4" id="_r_1_2_3_4" status="true"/>
<constraints/>
</context>
<context name="v">
<resolution feature="DCUTypeParameter" id="_r_13" status="true"/>
<constraints/>
</context>
<context name="b">
<constraints/>
</context>
<context name="a">
<constraints/>
</context>
<context name="weer">
<constraints/>
</context>
<context name="a">
<constraints/>
</context>
<context name="vv">
<constraints/>
</context>
<context name="v">
<constraints/>
</context>
<context name="v">
<constraints/>
</context>
<context name="n">
<constraints/>
</context>

<context name="b">
<constraints/>
</context>

<context name="hue">
<constraints/>
</context>

<context name="b">
<constraints/>
</context>

<context name="sdfsdfhfg">
<constraints/>
</context>

<context name="sdfsdfhfg">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<constraints/>
</context>

<context name="asdzdsdf]">
<constraints/>
</context>

<context name="asdzdsdf]sdfsdfhfg">
<constraints/>
</context>

<context name="asdasdashuejij">
<constraints/>
</context>

<context name="asdasadashuejij">
<constraints/>
</context>

<context name="asdasdashuejij">
<constraints/>
</context>

<context name="asdasadashuejij">
<constraints/>
</context>

<context name="asdasdashuejij">
<constraints/>
</context>

<context name="asdasadashuejij">
<constraints/>
</context>

<context name="asdasdashuejij">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<resolution feature="sfs" id="_r_37" status="false"/>
<resolution feature="sfhsiofd" id="_r_38" status="true"/>
<constraints/>
</context>

<context name="asdasdashuejij">
<constraints/>
</context>

<context name="asdasadashuejij">
<resolution feature="sfhsiofd" id="_r_38" status="true"/>
<resolution feature="sfs" id="_r_37" status="false"/>
<resolution feature="DeviceController" id="_r_35" status="true"/>
<constraints/>
</context>

<context name="Contexto1valor1Contexto2valor1">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<resolution feature="item 2" id="_r_39" status="false"/>
<resolution feature="item 3" id="_r_40" status="true"/>
<constraints/>
</context>

<context name="Bateriabaixaluminosidadealta">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<resolution feature="item 2" id="_r_39" status="false"/>
<resolution feature="item 3" id="_r_40" status="true"/>
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadebaixa">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriabaixaluminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriamedialuminosidadealta">
<constraints/>
</context>

<context name="Bateriabaixaluminosidadealta">
<constraints/>
</context>

<context name="Bateriabaixaluminosidadebaixa">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriamedialuminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadebaixa">
<constraints/>
</context>

<context name="Bateriamedialuminosidadebaixa">
<constraints/>
</context>
<contexto_rnf nome="Bateriamedialuminosidadebaixa">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
</contexto_rnf>

<context name="Bateriabaixaluminosidadebaixa">
<constraints/>
</context>
<contexto_rnf nome="Bateriabaixaluminosidadebaixa">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
</contexto_rnf>

<context name="Bateriabaixaluminosidadealta">
<constraints/>
</context>

<context name="Bateriaaltaluminosidadealta">
<constraints/>
</context>

<context name="Bateriamedialuminosidadealta">
<constraints/>
</context>
<contexto_rnf nome="Bateriamedialuminosidadealta">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
</contexto_rnf>

<context name="Bateriabaixaluminosidadealta">
<constraints/>
</context>
<contexto_rnf nome="Bateriabaixaluminosidadealta">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
</contexto_rnf>

<context name="Bateriaaltaluminosidadebaixa">
<constraints/>
</context>
<contexto_rnf nome="Bateriaaltaluminosidadebaixa">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
<valor_rnf id_feature="_r_39" id_rnf="valor 2" impacto="1" nome_feature="item 2"/>
</contexto_rnf>

<adaptacao nome="Bateriaaltaluminosidadealta">
<contexto nome="Bateria">
<valor nome="alta" status="true"/>
<valor nome="media" status="false"/>
<valor nome="baixa" status="false"/>
</contexto>
<contexto nome="luminosidade">
<valor nome="alta" status="true"/>
<valor nome="baixa" status="false"/>
</contexto>
</adaptacao>
<context name="Bateriaaltaluminosidadealta">
<resolution feature="DeviceController" id="_r_35" status="true"/>
<resolution feature="item 2" id="_r_39" status="false"/>
<resolution feature="item 3" id="_r_40" status="true"/>
<constraints>
<constraint>~_r_35 or _r_40</constraint>
</constraints>
</context>
<contexto_rnf nome="Bateriaaltaluminosidadealta">
<valor_rnf id_feature="_r_40" id_rnf="Valor" impacto="2" nome_feature="item 3"/>
</contexto_rnf>

<feature_tree>
:r DeviceControlUnit(_r)
	:m DeviceController(_r_35)
	:o item 2(_r_39)
	:m item 3(_r_40)
</feature_tree>
<arvore_rnf>
<caracteristica nome="Caracteristica">
<subcaracteristica nome="Subcaracteristica">
<propriedade_n_funcional nome="Valor" padrao=""/>
</subcaracteristica>
</caracteristica>
</arvore_rnf>
<arvore_adaptacao>
<contexto nome="Bateria">
<valor nome="alta" status="true"/>
<valor nome="media" status="false"/>
<valor nome="baixa" status="false"/>
</contexto>
<contexto nome="luminosidade">
<valor nome="alta" status="true"/>
<valor nome="baixa" status="false"/>
</contexto>
</arvore_adaptacao>
</feature_model>


text:
import IDictionary from './IDictionary';

type IHeaders = IDictionary<string>;
export default IHeaders;


text:
import path from 'path'

import { TextEditor } from 'atom'
import sax from 'sax'

import RuleStore, {
  Attributes,
  DocumentProps,
  SchemaLang,
} from './rules/RuleStore'
import generateRange, { RangeCompatible } from './util/generateRange'

export interface DefaultParserConfig {
  xmlCatalog: string
  dtdValidation: 'never' | 'always' | 'fallback'
  xIncludeAware: boolean
  xIncludeFixupBaseUris: boolean
  xIncludeFixupLanguage: boolean
}

export interface SchemaPropsWithLine {
  lang: SchemaLang
  path: string | null
  lineOfReference?: number
}

/**
 * Request-specific parser settings to be passed to the Java server.
 */
export interface ParserConfig {
  filePath?: string
  schemaProps: Array<SchemaPropsWithLine>
  xmlCatalog: string
  xIncludeAware: boolean
  xIncludeFixupBaseUris: boolean
  xIncludeFixupLanguage: boolean
}

export interface LinterMessage {
  severity: 'warning' | 'error'
  excerpt: string
  location: {
    file?: string
    position: RangeCompatible
  }
}

const urlRegex = /^(?:[a-z][a-z0-9+\-.]*:)?\/\//i

// the sax module eliminates linebreak characters in DOCTYPE so we need to
// match `\s*` instead of `\s+`
const publicIdRegex = /\s*[^\s]+\s*PUBLIC\s*("([^"]+)"|'([^']+)')/

/**
 * Extracts pseudo attributes from the data string of a processing instruction.
 */
const getPseudoAttsFromPIData = (piData: string) => {
  const pseudoAtts: Attributes = {}
  piData.replace(/(\w+)="(.+?)"/g, (_, key, value) => (pseudoAtts[key] = value))
  return pseudoAtts
}

const getXsiNamespacePrefixes = (attributes: Attributes) => {
  const prefixes: Array<string> = []
  Object.keys(attributes).forEach((key) => {
    const match = key.match(/xmlns:(.*)/)
    if (
      match &&
      attributes[key] === 'http://www.w3.org/2001/XMLSchema-instance'
    ) {
      prefixes.push(match[1])
    }
  })
  return prefixes
}

const isOddNumber = (n: number) => !!(n % 2)

/**
 * Splits a QName into prefix and localpart.
 */
const splitQName = (qName: string): [prefix: string, localpart: string] => {
  const colonIndex = qName.indexOf(':')
  return [qName.substr(0, colonIndex), qName.substr(colonIndex + 1)]
}

/**
 * Gets the configuration settings to be used by the Java parser such as parser
 * flags, schema and catalog information by pre-parsing the start of the
 * document and then adjusting the results with the `RuleOutcome` applying to
 * to the document.
 */
const getParserConfig = (
  textEditor: TextEditor,
  ruleStore: RuleStore,
  defaults: DefaultParserConfig
): {
  xmlModelWarnings: Array<LinterMessage>
  parserConfig: ParserConfig
} => {
  const filePath = textEditor.getPath()
  const baseUri = filePath ? path.dirname(filePath) : __dirname

  const xmlModelWarnings: Array<LinterMessage> = []
  const schemaProps: Array<SchemaPropsWithLine> = []
  const xsdSchemaPaths: Array<string> = []
  const saxParser = sax.parser(true)

  let row = 0
  let done = false
  let hasDoctype = false
  let rootNs
  let rootLocalName
  let rootAttributes = {}
  let publicId

  const addXsdSchemaPath = (href?: string) =>
    href &&
    xsdSchemaPaths.push(
      urlRegex.test(href) ? href : path.resolve(baseUri, href)
    )

  saxParser.onerror = () => (done = true)

  saxParser.ondoctype = (str) => {
    hasDoctype = true
    const match = str.match(publicIdRegex)
    if (match) {
      publicId = match[2] || match[3]
    }
  }

  saxParser.onprocessinginstruction = (node: {
    name: string
    body: string
  }) => {
    if (node.name !== 'xml-model') return

    const { href, type, schematypens } = getPseudoAttsFromPIData(node.body)

    let lang: SchemaLang | null = null
    if (href) {
      if (type === 'application/relax-ng-compact-syntax') {
        lang = 'rnc'
      } else if (schematypens === 'http://relaxng.org/ns/structure/1.0') {
        lang = path.extname(href) === '.rnc' ? 'rnc' : 'rng'
      } else if (schematypens === 'http://purl.oclc.org/dsdl/schematron') {
        lang = 'sch.iso'
      } else if (schematypens === 'http://www.ascc.net/xml/schematron') {
        lang = 'sch.15'
      } else if (schematypens === 'http://www.w3.org/2001/XMLSchema') {
        addXsdSchemaPath(href)
      } else {
        xmlModelWarnings.push({
          severity: 'warning',
          excerpt: 'Unknown schema type',
          location: {
            file: filePath,
            position: generateRange(textEditor, row),
          },
        })
      }
    }

    if (lang) {
      schemaProps.push({
        lang,
        lineOfReference: row,
        path: urlRegex.test(href) ? href : path.resolve(baseUri, href),
      })
    }
  }

  saxParser.onopentag = (node: sax.Tag) => {
    if (done) return

    const [rootNsPrefix, localName] = splitQName(node.name)
    rootNs = rootNsPrefix
      ? node.attributes['xmlns:' + rootNsPrefix]
      : node.attributes.xmlns
    rootLocalName = localName
    rootAttributes = node.attributes

    getXsiNamespacePrefixes(node.attributes).forEach((prefix) => {
      const noNamespaceSchemaLocation =
        node.attributes[prefix + ':noNamespaceSchemaLocation']
      if (noNamespaceSchemaLocation) {
        addXsdSchemaPath(noNamespaceSchemaLocation.trim())
      }

      const schemaLocation = node.attributes[prefix + ':schemaLocation']
      if (schemaLocation) {
        schemaLocation
          .trim()
          .split(/[ \t\r\n]+/)
          // the value of `schemaLocation` is a sequence of `[ns] [uri]` pairs
          // but we only need the URIs
          .filter((_: string, index: number) => isOddNumber(index))
          .forEach(addXsdSchemaPath)
      }
    })

    done = true
  }

  const textBuffer = textEditor.getBuffer()
  const lineCount = textBuffer.getLineCount()
  const chunkSize = 64

  while (!done && row < lineCount) {
    const line = textBuffer.lineForRow(row) || ''
    const lineLength = line.length
    let column = 0
    while (!done && column < lineLength) {
      saxParser.write(line.substr(column, chunkSize))
      column += chunkSize
    }
    row++
  }

  if (xsdSchemaPaths.length) {
    schemaProps.push({
      lang: 'xsd',
      path: xsdSchemaPaths.join('*'),
    })
  }

  const docProps: DocumentProps = {
    rootScopes: textEditor.getRootScopeDescriptor().getScopesArray(),
    filePath,
    rootNs,
    rootLocalName,
    rootAttributes,
    publicId,
  }

  const ruleOutcome = ruleStore.getMatchingOutcome(docProps)

  const xmlCatalog = ruleOutcome?.xmlCatalog ?? defaults.xmlCatalog
  const dtdValidation = ruleOutcome?.dtdValidation ?? defaults.dtdValidation
  const xIncludeAware = ruleOutcome?.xIncludeAware ?? defaults.xIncludeAware
  const xIncludeFixupBaseUris =
    ruleOutcome?.xIncludeFixupBaseUris ?? defaults.xIncludeFixupBaseUris
  const xIncludeFixupLanguage =
    ruleOutcome?.xIncludeFixupLanguage ?? defaults.xIncludeFixupLanguage

  // `schemaProps` from rules should only apply when there are no schema hints
  // in the current document
  if (!schemaProps.length && ruleOutcome?.schemaProps) {
    schemaProps.push(...ruleOutcome.schemaProps)
  }

  // add DTD validation depending on the `dtdValidation` user setting
  if (
    hasDoctype &&
    (dtdValidation === 'always' ||
      (dtdValidation === 'fallback' && !schemaProps.length))
  ) {
    schemaProps.push({
      lang: 'dtd',
      path: null,
      lineOfReference: saxParser.line,
    })
  }

  if (!schemaProps.length) {
    schemaProps.push({
      lang: 'none',
      path: null,
    })
  }

  return {
    xmlModelWarnings,

    parserConfig: {
      filePath,
      schemaProps,
      xmlCatalog,
      xIncludeAware,
      xIncludeFixupBaseUris,
      xIncludeFixupLanguage,
    },
  }
}

export default getParserConfig


text:
// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.analysis.mock;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.io.MoreFiles;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.ShellConfiguration;
import com.google.devtools.build.lib.analysis.util.AnalysisMock;
import com.google.devtools.build.lib.bazel.repository.LocalConfigPlatformFunction;
import com.google.devtools.build.lib.bazel.repository.LocalConfigPlatformRule;
import com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider;
import com.google.devtools.build.lib.packages.util.BazelMockCcSupport;
import com.google.devtools.build.lib.packages.util.BazelMockPythonSupport;
import com.google.devtools.build.lib.packages.util.MockCcSupport;
import com.google.devtools.build.lib.packages.util.MockGenruleSupport;
import com.google.devtools.build.lib.packages.util.MockPlatformSupport;
import com.google.devtools.build.lib.packages.util.MockPythonSupport;
import com.google.devtools.build.lib.packages.util.MockToolsConfig;
import com.google.devtools.build.lib.rules.repository.RepositoryFunction;
import com.google.devtools.build.lib.testutil.TestConstants;
import com.google.devtools.build.lib.testutil.TestRuleClassProvider;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.runfiles.Runfiles;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;

/** Subclass of {@link AnalysisMock} using Bazel-specific semantics. */
public final class BazelAnalysisMock extends AnalysisMock {
  public static final AnalysisMock INSTANCE = new BazelAnalysisMock();

  private BazelAnalysisMock() {}

  @Override
  public ImmutableList<String> getWorkspaceContents(MockToolsConfig config) {
    String xcodeWorkspace = config.getPath("local_config_xcode_workspace").getPathString();
    String protobufWorkspace = config.getPath("protobuf_workspace").getPathString();
    String bazelToolWorkspace = config.getPath("embedded_tools").getPathString();
    String bazelPlatformsWorkspace = config.getPath("platforms_workspace").getPathString();
    String rulesJavaWorkspace = config.getPath("rules_java_workspace").getPathString();
    String localConfigPlatformWorkspace =
        config.getPath("local_config_platform_workspace").getPathString();

    return ImmutableList.of(
        "local_repository(name = 'bazel_tools', path = '" + bazelToolWorkspace + "')",
        "local_repository(name = 'platforms', path = '" + bazelPlatformsWorkspace + "')",
        "local_repository(name = 'local_config_xcode', path = '" + xcodeWorkspace + "')",
        "local_repository(name = 'com_google_protobuf', path = '" + protobufWorkspace + "')",
        "local_repository(name = 'rules_java', path = '" + rulesJavaWorkspace + "')",
        "register_toolchains('@rules_java//java/toolchains/runtime:all')",
        "register_toolchains('@rules_java//java/toolchains/javac:all')",
        "bind(name = 'android/sdk', actual='@bazel_tools//tools/android:sdk')",
        "register_toolchains('@bazel_tools//tools/cpp:all')",
        "register_toolchains('@bazel_tools//tools/jdk:all')",
        "register_toolchains('@bazel_tools//tools/android:all')",
        // Note this path is created inside the test infrastructure in
        // createAndroidBuildContents() below. It may not reflect a real depot path.
        "register_toolchains('@bazel_tools//tools/android/dummy_sdk:all')",
        "register_toolchains('@bazel_tools//tools/python:autodetecting_toolchain')",
        "local_repository(name = 'local_config_platform', path = '"
            + localConfigPlatformWorkspace
            + "')");
  }

  /** Keep this in sync with the WORKSPACE content in {@link #getWorkspaceContents}. */
  @Override
  public ImmutableList<String> getWorkspaceRepos() {
    return ImmutableList.of(
        "bazel_tools",
        "com_google_protobuf",
        "local_config_platform",
        "local_config_xcode",
        "platforms",
        "rules_java");
  }

  @Override
  public void setupMockClient(MockToolsConfig config) throws IOException {
    List<String> workspaceContents = getWorkspaceContents(config);
    setupMockClient(config, workspaceContents);
  }

  @Override
  public void setupMockClient(MockToolsConfig config, List<String> workspaceContents)
      throws IOException {
    config.create("local_config_xcode_workspace/BUILD", "xcode_config(name = 'host_xcodes')");
    config.create(
        "protobuf_workspace/BUILD",
        "licenses(['notice'])",
        "exports_files(['protoc', 'cc_toolchain'])");
    config.create("local_config_xcode_workspace/WORKSPACE");
    config.create("protobuf_workspace/WORKSPACE");
    config.overwrite("WORKSPACE", workspaceContents.toArray(new String[0]));
    /** The rest of platforms is initialized in {@link MockPlatformSupport}. */
    config.create("platforms_workspace/WORKSPACE", "workspace(name = 'platforms')");
    config.create("embedded_tools/WORKSPACE", "workspace(name = 'bazel_tools')");
    Runfiles runfiles = Runfiles.create();
    for (String filename : Arrays.asList("tools/jdk/java_toolchain_alias.bzl")) {
      java.nio.file.Path path = Paths.get(runfiles.rlocation("io_bazel/" + filename));
      if (!Files.exists(path)) {
        continue; // the io_bazel workspace root only exists for Bazel
      }
      config.create("embedded_tools/" + filename, MoreFiles.asCharSource(path, UTF_8).read());
    }
    config.create(
        "embedded_tools/tools/jdk/BUILD",
        "load(",
        "    ':java_toolchain_alias.bzl',",
        "    'java_toolchain_alias',",
        "    'java_runtime_alias',",
        "    'java_host_runtime_alias',",
        ")",
        "package(default_visibility=['//visibility:public'])",
        "java_toolchain(",
        "  name = 'toolchain',",
        "  source_version = '8',",
        "  target_version = '8',",
        "  bootclasspath = [':bootclasspath'],",
        "  javabuilder = ['JavaBuilder_deploy.jar'],",
        "  jacocorunner = ':JacocoCoverage',",
        "  header_compiler = ['turbine_deploy.jar'],",
        "  header_compiler_direct = ['TurbineDirect_deploy.jar'],",
        "  singlejar = ['singlejar'],",
        "  genclass = ['GenClass_deploy.jar'],",
        "  ijar = ['ijar'],",
        "  java_runtime = 'host_jdk',",
        ")",
        "java_toolchain(",
        "  name = 'remote_toolchain',",
        "  source_version = '8',",
        "  target_version = '8',",
        "  bootclasspath = [':bootclasspath'],",
        "  javabuilder = ['JavaBuilder_deploy.jar'],",
        "  jacocorunner = ':JacocoCoverage',",
        "  header_compiler = ['turbine_deploy.jar'],",
        "  header_compiler_direct = ['TurbineDirect_deploy.jar'],",
        "  singlejar = ['singlejar'],",
        "  genclass = ['GenClass_deploy.jar'],",
        "  ijar = ['ijar'],",
        "  java_runtime = 'host_jdk',",
        ")",
        "java_import(",
        "  name = 'JacocoCoverageRunner',",
        "  jars = ['JacocoCoverage_jarjar_deploy.jar'],",
        ")",
        "java_import(",
        "  name = 'proguard_import',",
        "  jars = ['proguard_rt.jar'],",
        ")",
        "java_binary(",
        "  name = 'proguard',",
        "  main_class = 'proguard.Proguard',",
        "  runtime_deps = [':proguard_import'],",
        ")",
        "java_import(",
        "  name = 'TestRunner',",
        "  jars = ['TestRunner.jar'],",
        ")",
        "java_runtime(name = 'jdk', srcs = [])",
        "java_runtime(name = 'host_jdk', srcs = [])",
        "java_runtime(name = 'remote_jdk11', srcs = [])",
        "java_toolchain_alias(name = 'current_java_toolchain')",
        "java_runtime_alias(name = 'current_java_runtime')",
        "java_host_runtime_alias(name = 'current_host_java_runtime')",
        "filegroup(name='langtools', srcs=['jdk/lib/tools.jar'])",
        "filegroup(name='bootclasspath', srcs=['jdk/jre/lib/rt.jar'])",
        "filegroup(name='extdir', srcs=glob(['jdk/jre/lib/ext/*']))",
        "filegroup(name='java', srcs = ['jdk/jre/bin/java'])",
        "filegroup(name='JacocoCoverage', srcs = ['JacocoCoverage_deploy.jar'])",
        "exports_files([",
        "    'JavaBuilder_deploy.jar',",
        "    'singlejar',",
        "    'TestRunner_deploy.jar',",
        "    'ijar',",
        "    'GenClass_deploy.jar',",
        "    'turbine_deploy.jar',",
        "    'TurbineDirect_deploy.jar',",
        "    'proguard_allowlister.par',",
        "])",
        "toolchain_type(name = 'toolchain_type')",
        "toolchain_type(name = 'runtime_toolchain_type')",
        "toolchain(",
        "   name = 'dummy_java_toolchain',",
        "   toolchain_type = ':toolchain_type',",
        "   toolchain = ':toolchain',",
        ")",
        "toolchain(",
        "   name = 'dummy_java_runtime_toolchain',",
        "   toolchain_type = ':runtime_toolchain_type',",
        "   toolchain = ':jdk',",
        ")",
        "java_plugins_flag_alias(name = 'java_plugins_flag_alias')");

    // Create a default Android target platform.
    // Any tests that create platforms should inherit from this.
    config.create(
        TestConstants.PLATFORMS_PATH + "/android/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "platform(",
        "  name = 'armeabi-v7a',",
        "  parents = ['" + TestConstants.PLATFORM_PACKAGE_ROOT + ":default_target'],",
        "  constraint_values = [",
        "    '" + TestConstants.CONSTRAINTS_PACKAGE_ROOT + "os:android',",
        "    '" + TestConstants.CONSTRAINTS_PACKAGE_ROOT + "cpu:arm',",
        "  ],",
        ")");

    // Create the actual SDKs.
    ImmutableList<String> androidBuildContents = createAndroidBuildContents();
    config.create(
        "embedded_tools/tools/android/BUILD", androidBuildContents.toArray(new String[0]));
    config.create(
        "embedded_tools/tools/android/emulator/BUILD",
        Iterables.toArray(createToolsAndroidEmulatorContents(), String.class));
    // Create a dummy toolchain to make toolchain resolution happy.
    config.create(
        "embedded_tools/tools/android/dummy_sdk/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "toolchain(",
        "    name = 'dummy-sdk',",
        "    toolchain = ':invalid-fallback-sdk',",
        "    toolchain_type = '@bazel_tools//tools/android:sdk_toolchain_type'",
        ")",
        "filegroup(",
        "    name = 'jar-filegroup',",
        "    srcs = ['dummy.jar'],",
        ")",
        "genrule(",
        "    name = 'empty-binary',",
        "    srcs = [],",
        "    outs = ['empty.sh'],",
        "    cmd = 'touch $@',",
        "    executable = 1,",
        ")",
        "android_sdk(",
        "    name = 'invalid-fallback-sdk',",
        "    aapt = ':empty_binary',",
        "    aapt2 = ':empty_binary',",
        "    adb = ':empty_binary',",
        "    aidl = ':empty_binary',",
        "    android_jar = ':jar-filegroup',",
        "    apksigner = ':empty_binary',",
        "    dx = ':empty_binary',",
        "    framework_aidl = 'dummy.jar',",
        "    main_dex_classes = 'dummy.jar',",
        "    main_dex_list_creator = ':empty_binary',",
        "    proguard = 'empty_binary',",
        "    shrinked_android_jar = 'dummy.jar',",
        "    zipalign = ':empty_binary',",
        "    tags = ['__ANDROID_RULES_MIGRATION__'],",
        ")");

    MockGenruleSupport.setup(config);

    config.create(
        "embedded_tools/tools/test/BUILD",
        "filegroup(name = 'runtime', srcs = ['test-setup.sh', 'test-xml-generator.sh'])",
        "filegroup(name = 'test_wrapper', srcs = ['test_wrapper_bin'])",
        "filegroup(name = 'xml_writer', srcs = ['xml_writer_bin'])",
        "filegroup(name = 'test_setup', srcs = ['test-setup.sh'])",
        "filegroup(name = 'test_xml_generator', srcs = ['test-xml-generator.sh'])",
        "filegroup(name = 'collect_coverage', srcs = ['collect_coverage.sh'])",
        "filegroup(name = 'collect_cc_coverage', srcs = ['collect_cc_coverage.sh'])",
        "filegroup(name='coverage_support', srcs=['collect_coverage.sh'])",
        "filegroup(name = 'coverage_report_generator', srcs = ['coverage_report_generator.sh'])",
        "filegroup(name = 'lcov_merger', srcs = ['lcov_merger.sh'])");

    // Use an alias package group to allow for modification at the simpler path
    config.create(
        "embedded_tools/tools/allowlists/config_feature_flag/BUILD",
        "package_group(",
        "    name='config_feature_flag',",
        "    includes=['@//tools/allowlists/config_feature_flag'],",
        ")",
        "package_group(",
        "    name='config_feature_flag_setter',",
        "    includes=['@//tools/allowlists/config_feature_flag:config_feature_flag_setter'],",
        ")");

    config.create(
        "tools/allowlists/config_feature_flag/BUILD",
        "package_group(name='config_feature_flag', packages=['//...'])",
        "package_group(name='config_feature_flag_Setter', packages=['//...'])");

    config.create(
        "embedded_tools/tools/zip/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "exports_files(['precompile.py'])",
        "cc_binary(name='zipper', srcs=['zip_main.cc'])",
        "alias(name='unzip_fdo', actual=':zipper')");

    config.create(
        "embedded_tools/tools/launcher/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "load('@bazel_tools//third_party/cc_rules/macros:defs.bzl', 'cc_binary')",
        "cc_binary(name='launcher', srcs=['launcher_main.cc'])");

    config.create(
        "embedded_tools/tools/def_parser/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "filegroup(name='def_parser', srcs=['def_parser.exe'])");

    config.create(
        "embedded_tools/objcproto/BUILD",
        "package(default_visibility=['//visibility:public'])",
        "objc_library(",
        "  name = 'protobuf_lib',",
        "  srcs = ['empty.m'],",
        "  hdrs = ['include/header.h'],",
        "  includes = ['include'],",
        ")",
        "exports_files(['well_known_type.proto'])",
        "proto_library(",
        "  name = 'well_known_type_proto',",
        "  srcs = ['well_known_type.proto'],",
        ")");
    config.create("embedded_tools/objcproto/empty.m");
    config.create("embedded_tools/objcproto/empty.cc");
    config.create("embedded_tools/objcproto/well_known_type.proto");

    config.create("rules_java_workspace/WORKSPACE", "workspace(name = 'rules_java')");
    config.create("rules_java_workspace/java/BUILD");
    config.create(
        "rules_java_workspace/java/defs.bzl",
        "def java_binary(**attrs):",
        "    native.java_binary(**attrs)",
        "def java_library(**attrs):",
        "    native.java_library(**attrs)",
        "def java_import(**attrs):",
        "    native.java_import(**attrs)");
    config.create(
        "rules_java_workspace/java/repositories.bzl",
        "def rules_java_dependencies():",
        "    pass",
        "def rules_java_toolchains():",
        "    pass");

    config.create(
        "rules_java_workspace/java/toolchains/runtime/BUILD",
        "toolchain_type(name = 'toolchain_type')",
        "toolchain(",
        "    name = 'local_jdk',",
        "    toolchain = '@bazel_tools//tools/jdk:jdk',",
        "    toolchain_type = '@rules_java//java/toolchains/runtime:toolchain_type',",
        "    )");
    config.create(
        "rules_java_workspace/java/toolchains/javac/BUILD",
        "toolchain_type(name = 'toolchain_type')",
        "toolchain(",
        "    name = 'javac_toolchain',",
        "    toolchain = '@bazel_tools//tools/jdk:toolchain',",
        "    toolchain_type = '@rules_java//java/toolchains/javac:toolchain_type',",
        "    )");

    MockPlatformSupport.setup(config);
    ccSupport().setup(config);
    pySupport().setup(config);
    ShellConfiguration.injectShellExecutableFinder(BazelRuleClassProvider.SHELL_EXECUTABLE);
  }

  /** Contents of {@code //tools/android/emulator/BUILD.tools}. */
  private ImmutableList<String> createToolsAndroidEmulatorContents() {
    return ImmutableList.of(
        "exports_files(['emulator_arm', 'emulator_x86', 'mksd', 'empty_snapshot_fs'])",
        "filegroup(name = 'emulator_x86_bios', srcs = ['bios.bin', 'vgabios-cirrus.bin'])",
        "filegroup(name = 'xvfb_support', srcs = ['support_file1', 'support_file2'])",
        "sh_binary(name = 'unified_launcher', srcs = ['empty.sh'])",
        "filegroup(name = 'shbase', srcs = ['googletest.sh'])",
        "filegroup(name = 'sdk_path', srcs = ['empty.sh'])");
  }

  private ImmutableList<String> createAndroidBuildContents() {
    ImmutableList.Builder<String> androidBuildContents = ImmutableList.builder();

    androidBuildContents.add(
        "package(default_visibility=['//visibility:public'])",
        "toolchain_type(name = 'sdk_toolchain_type')",
        "toolchain(",
        "  name = 'sdk_toolchain',",
        "  toolchain = ':sdk',",
        "  toolchain_type = ':sdk_toolchain_type',",
        "  target_compatible_with = [",
        "    '" + TestConstants.CONSTRAINTS_PACKAGE_ROOT + "os:android',",
        "  ],",
        ")",
        "android_sdk(",
        "    name = 'sdk',",
        "    aapt = ':static_aapt_tool',",
        "    aapt2 = ':static_aapt2_tool',",
        "    adb = ':static_adb_tool',",
        "    aidl = ':static_aidl_tool',",
        "    android_jar = ':android_runtime_jar',",
        "    apksigner = ':ApkSignerBinary',",
        "    dx = ':dx_binary',",
        "    framework_aidl = ':aidl_framework',",
        "    main_dex_classes = ':mainDexClasses.rules',",
        "    main_dex_list_creator = ':main_dex_list_creator',",
        "    proguard = ':ProGuard',",
        "    shrinked_android_jar = ':shrinkedAndroid.jar',",
        "    zipalign = ':zipalign',",
        "    tags = ['__ANDROID_RULES_MIGRATION__'],",
        ")",
        "filegroup(name = 'android_runtime_jar', srcs = ['android.jar'])",
        "filegroup(name = 'dx_binary', srcs = ['dx_binary.jar'])");

    androidBuildContents
        .add("sh_binary(name = 'aar_generator', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'desugar_java8', srcs = ['empty.sh'])")
        .add("filegroup(name = 'desugar_java8_extra_bootclasspath', srcs = ['fake.jar'])")
        .add("filegroup(name = 'java8_legacy_dex', srcs = ['java8_legacy.dex.zip'])")
        .add("sh_binary(name = 'build_java8_legacy_dex', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'merge_proguard_maps', srcs = ['empty.sh'])")
        .add("filegroup(name = 'desugared_java8_legacy_apis', srcs = ['fake.jar'])")
        .add("sh_binary(name = 'aar_native_libs_zip_creator', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'resource_extractor', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'dexbuilder', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'dexbuilder_after_proguard', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'dexmerger', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'dexsharder', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'aar_import_deps_checker', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'busybox', srcs = ['empty.sh'])")
        .add("android_library(name = 'incremental_stub_application')")
        .add("android_library(name = 'incremental_split_stub_application')")
        .add("sh_binary(name = 'stubify_manifest', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'merge_dexzips', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'build_split_manifest', srcs = ['empty.sh'])")
        .add("filegroup(name = 'debug_keystore', srcs = ['fake.file'])")
        .add("sh_binary(name = 'shuffle_jars', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'strip_resources', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'build_incremental_dexmanifest', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'incremental_install', srcs = ['empty.sh'])")
        .add("java_binary(name = 'IdlClass',")
        .add("            runtime_deps = [ ':idlclass_import' ],")
        .add("            main_class = 'com.google.devtools.build.android.idlclass.IdlClass')")
        .add("java_binary(name = 'zip_filter',")
        .add("            main_class = 'com.google.devtools.build.android.ZipFilterAction',")
        .add("            runtime_deps = [ ':ZipFilterAction_import' ])")
        .add("java_import(name = 'ZipFilterAction_import',")
        .add("            jars = [ 'ZipFilterAction_deploy.jar' ])")
        .add("sh_binary(name = 'aar_resources_extractor', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'aar_embedded_jars_extractor', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'aar_embedded_proguard_extractor', srcs = ['empty.sh'])")
        .add("java_import(name = 'idlclass_import',")
        .add("            jars = [ 'idlclass.jar' ])")
        .add("exports_files(['adb', 'adb_static'])")
        .add("sh_binary(name = 'android_runtest', srcs = ['empty.sh'])")
        .add("sh_binary(name = 'instrumentation_test_entry_point', srcs = ['empty.sh'])")
        .add("java_plugin(name = 'databinding_annotation_processor',")
        .add("    generates_api = 1,")
        .add("    processor_class = 'android.databinding.annotationprocessor.ProcessDataBinding')")
        .add("sh_binary(name = 'instrumentation_test_check', srcs = ['empty.sh'])")
        .add("package_group(name = 'android_device_allowlist', packages = ['//...'])")
        .add("package_group(name = 'export_deps_allowlist', packages = ['//...'])")
        .add("package_group(name = 'allow_android_library_deps_without_srcs_allowlist',")
        .add("    packages=['//...'])")
        .add("android_tools_defaults_jar(name = 'android_jar')")
        .add("sh_binary(name = 'dex_list_obfuscator', srcs = ['empty.sh'])");

    return androidBuildContents.build();
  }

  @Override
  public void setupMockWorkspaceFiles(Path embeddedBinariesRoot) throws IOException {
    embeddedBinariesRoot.createDirectoryAndParents();
    Path jdkWorkspacePath = embeddedBinariesRoot.getRelative("jdk.WORKSPACE");
    FileSystemUtils.writeContentAsLatin1(jdkWorkspacePath, "");
  }

  @Override
  public void setupMockToolsRepository(MockToolsConfig config) throws IOException {
    config.create("embedded_tools/WORKSPACE", "workspace(name = 'bazel_tools')");
    config.create("embedded_tools/tools/build_defs/repo/BUILD");
    config.create(
        "embedded_tools/tools/build_defs/repo/utils.bzl",
        "def maybe(repo_rule, name, **kwargs):",
        "  if name not in native.existing_rules():",
        "    repo_rule(name = name, **kwargs)");
    config.create(
        "embedded_tools/tools/build_defs/repo/http.bzl",
        "def http_archive(**kwargs):",
        "  pass",
        "",
        "def http_file(**kwargs):",
        "  pass");
    config.create(
        "embedded_tools/tools/jdk/local_java_repository.bzl",
        "def local_java_repository(**kwargs):",
        "  pass");
    config.create(
        "embedded_tools/tools/jdk/remote_java_repository.bzl",
        "def remote_java_repository(**kwargs):",
        "  pass");
    config.create(
        "embedded_tools/tools/cpp/cc_configure.bzl", "def cc_configure(**kwargs):", "  pass");

    config.create("embedded_tools/tools/sh/BUILD");
    config.create(
        "embedded_tools/tools/sh/sh_configure.bzl", "def sh_configure(**kwargs):", "  pass");
    config.create("embedded_tools/tools/osx/BUILD");
    config.create(
        "embedded_tools/tools/osx/xcode_configure.bzl",
        "def xcode_configure(*args, **kwargs):", // no positional arguments for XCode
        "  pass");
    config.create("embedded_tools/bin/sh", "def sh(**kwargs):", "  pass");
  }

  @Override
  public ConfiguredRuleClassProvider createRuleClassProvider() {
    return TestRuleClassProvider.getRuleClassProviderWithClearedSuffix();
  }

  @Override
  public boolean isThisBazel() {
    return true;
  }

  @Override
  public MockCcSupport ccSupport() {
    return BazelMockCcSupport.INSTANCE;
  }

  @Override
  public MockPythonSupport pySupport() {
    return BazelMockPythonSupport.INSTANCE;
  }

  @Override
  public void addExtraRepositoryFunctions(
      ImmutableMap.Builder<String, RepositoryFunction> repositoryHandlers) {
    repositoryHandlers.put(LocalConfigPlatformRule.NAME, new LocalConfigPlatformFunction());
  }
}


text:
.class public final Landroid/security/KeyChain$KeyChainConnection;
.super Ljava/lang/Object;
.source "KeyChain.java"

# interfaces
.implements Ljava/io/Closeable;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/security/KeyChain;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "KeyChainConnection"
.end annotation

# instance fields
.field private final context:Landroid/content/Context;

.field private final service:Landroid/security/IKeyChainService;

.field private final serviceConnection:Landroid/content/ServiceConnection;

# direct methods
.method private constructor <init>(Landroid/content/Context;Landroid/content/ServiceConnection;Landroid/security/IKeyChainService;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "serviceConnection"    # Landroid/content/ServiceConnection;
    .param p3, "service"    # Landroid/security/IKeyChainService;

    .prologue
    .line 497
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 500
    iput-object p1, p0, Landroid/security/KeyChain$KeyChainConnection;->context:Landroid/content/Context;

    .line 501
    iput-object p2, p0, Landroid/security/KeyChain$KeyChainConnection;->serviceConnection:Landroid/content/ServiceConnection;

    .line 502
    iput-object p3, p0, Landroid/security/KeyChain$KeyChainConnection;->service:Landroid/security/IKeyChainService;

    .line 499
    return-void
.end method

.method synthetic constructor <init>(Landroid/content/Context;Landroid/content/ServiceConnection;Landroid/security/IKeyChainService;Landroid/security/KeyChain$KeyChainConnection;)V
    .registers 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "serviceConnection"    # Landroid/content/ServiceConnection;
    .param p3, "service"    # Landroid/security/IKeyChainService;

    .prologue
    invoke-direct {p0, p1, p2, p3}, Landroid/security/KeyChain$KeyChainConnection;-><init>(Landroid/content/Context;Landroid/content/ServiceConnection;Landroid/security/IKeyChainService;)V

    return-void
.end method

# virtual methods
.method public close()V
    .registers 3

    .prologue
    .line 505
    iget-object v0, p0, Landroid/security/KeyChain$KeyChainConnection;->context:Landroid/content/Context;

    iget-object v1, p0, Landroid/security/KeyChain$KeyChainConnection;->serviceConnection:Landroid/content/ServiceConnection;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V

    .line 504
    return-void
.end method

.method public getService()Landroid/security/IKeyChainService;
    .registers 2

    .prologue
    .line 508
    iget-object v0, p0, Landroid/security/KeyChain$KeyChainConnection;->service:Landroid/security/IKeyChainService;

    return-object v0
.end method