class AbstractContractDefinitionParser extends AbstractSingleBeanDefinitionParser
                                                                                                 implements
                                                                                                 SofaBootTagNameSupport {
    public static final String INTERFACE_ELEMENT            = "interface";

    public static final String INTERFACE_PROPERTY           = "interfaceType";

    public static final String INTERFACE_CLASS_PROPERTY     = "interfaceClass";

    public static final String BEAN_ID_ELEMENT              = "id";

    public static final String BEAN_ID_PROPERTY             = "beanId";

    public static final String UNIQUE_ID_ELEMENT            = "unique-id";

    public static final String UNIQUE_ID_PROPERTY           = "uniqueId";

    public static final String ELEMENTS                     = "elements";

    public static final String BINDINGS                     = "bindings";

    public static final String REPEAT_REFER_LIMIT_ELEMENT   = "repeatReferLimit";

    public static final String REPEAT_REFER_LIMIT_PROPERTY  = "repeatReferLimit";

    public static final String DEFINITION_BUILDING_API_TYPE = "apiType";

    public static final String SOFA_RUNTIME_CONTEXT         = "sofaRuntimeContext";

    public static final String BINDING_CONVERTER_FACTORY    = "bindingConverterFactory";

    public static final String BINDING_ADAPTER_FACTORY      = "bindingAdapterFactory";

    @Override
    protected void doParse(Element element, ParserContext parserContext,
                           BeanDefinitionBuilder builder) {<FILL_FUNCTION_BODY>}

    /**
     * Actually parse internal element.
     *
     * @param element element
     * @param parserContext parserContext
     * @param builder builder
     */
    protected abstract void doParseInternal(Element element, ParserContext parserContext,
                                            BeanDefinitionBuilder builder);
}

        builder.addAutowiredProperty(SOFA_RUNTIME_CONTEXT);
        builder.addAutowiredProperty(BINDING_CONVERTER_FACTORY);
        builder.addAutowiredProperty(BINDING_ADAPTER_FACTORY);

        String id = element.getAttribute(BEAN_ID_ELEMENT);
        builder.addPropertyValue(BEAN_ID_PROPERTY, id);

        String interfaceType = element.getAttribute(INTERFACE_ELEMENT);
        builder.addPropertyValue(INTERFACE_PROPERTY, interfaceType);
        builder.getBeanDefinition().getConstructorArgumentValues()
            .addIndexedArgumentValue(0, interfaceType);

        String uniqueId = element.getAttribute(UNIQUE_ID_ELEMENT);
        builder.addPropertyValue(UNIQUE_ID_PROPERTY, uniqueId);

        String repeatReferLimit = element.getAttribute(REPEAT_REFER_LIMIT_ELEMENT);
        builder.addPropertyValue(REPEAT_REFER_LIMIT_PROPERTY, repeatReferLimit);

        List<Element> childElements = DomUtils.getChildElements(element);
        List<TypedStringValue> elementAsTypedStringValueList = new ArrayList<>();

        for (Element childElement : childElements) {
            try {
                TransformerFactory transFactory = TransformerFactory.newInstance();
                Transformer transformer = transFactory.newTransformer();
                StringWriter buffer = new StringWriter();
                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
                transformer.transform(new DOMSource(childElement), new StreamResult(buffer));
                String str = buffer.toString();
                elementAsTypedStringValueList.add(new TypedStringValue(str, Element.class));
            } catch (Throwable e) {
                throw new ServiceRuntimeException(e);
            }
        }

        builder.addPropertyValue("documentEncoding", element.getOwnerDocument().getXmlEncoding());
        builder.addPropertyValue(ELEMENTS, elementAsTypedStringValueList);

        doParseInternal(element, parserContext, builder);
    
<methods>public void <init>() <variables>