write out the statement to adapter

@param adapter
@throws TemplateException
777715
@Override
    public final void writeOut(Context c) throws TransformerException {
	BytecodeContext bc = (BytecodeContext) c;
	ExpressionUtil.visitLine(bc, start);
	_writeOut(bc);
	ExpressionUtil.visitLine(bc, end);

    }
392865
public void putUnchecked(CodeBuilder adapter) {
    checkState(!isStatic(), "This field is static!");
    adapter.putField(owner().type(), name(), type());
  }
1214628
public void write(Writer out, ELContext ctx) throws ELException, IOException
    {
        out.write(this.literal);
    }
1131018
public void writeTo(Writer writer) throws IOException {
        JsonSerializer.write(Json.jObject("template", asJson()), writer);
        writer.flush();
    }
419681
public void loadTemplates() throws TemplateException {
        loadStrategyI.loadTemplates();
        this.templateSet = loadStrategyI.getTemplates();
        this.templateOrders = loadStrategyI.getOrders();
    }
469224
public void execute(
          TransformerImpl transformer)
            throws TransformerException
  {

    if (null != m_template)
    {
      XPathContext xctxt = transformer.getXPathContext();
      VariableStack vars = xctxt.getVarStack();

      int thisframe = vars.getStackFrame();
      int nextFrame = vars.link(m_template.m_frameSize);
      
      // We have to clear the section of the stack frame that has params 
      // so that the default param evaluation will work correctly.
      if(m_template.m_inArgsSize > 0)
      {
        vars.clearLocalSlots(0, m_template.m_inArgsSize);
      
        if(null != m_paramElems)
        {
          int currentNode = xctxt.getCurrentNode();
          vars.setStackFrame(thisframe);
          int size = m_paramElems.length;
          
          for (int i = 0; i < size; i++) 
          {
            ElemWithParam ewp = m_paramElems[i];
            if(ewp.m_index >= 0)
            {
              XObject obj = ewp.getValue(transformer, currentNode);

              // Note here that the index for ElemWithParam must have been
              // statically made relative to the xsl:template being called, 
              // NOT this xsl:template.
              vars.setLocalVariable(ewp.m_index, obj, nextFrame);
            }
          }
          vars.setStackFrame(nextFrame);
        }
      }
      
      SourceLocator savedLocator = xctxt.getSAXLocator();

      try
      {
        xctxt.setSAXLocator(m_template);

        // template.executeChildTemplates(transformer, sourceNode, mode, true);
        transformer.pushElemTemplateElement(m_template);
        m_template.execute(transformer);
      }
      finally
      {
        transformer.popElemTemplateElement();
        xctxt.setSAXLocator(savedLocator);
        // When we entered this function, the current 
        // frame buffer (cfb) index in the variable stack may 
        // have been manually set.  If we just call 
        // unlink(), however, it will restore the cfb to the 
        // previous link index from the link stack, rather than 
        // the manually set cfb.  So, 
        // the only safe solution is to restore it back 
        // to the same position it was on entry, since we're 
        // really not working in a stack context here. (Bug4218)
        vars.unlink(thisframe);
      }
    }
    else
    {
      transformer.getMsgMgr().error(this, XSLTErrorResources.ER_TEMPLATE_NOT_FOUND,
                                    new Object[]{ m_templateName });  //"Could not find template named: '"+templateName+"'");
    }
    
  }
5199
@Override
    public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
        StringWriter stringWriter = new StringWriter();
        WhereContext whereContext = new WhereContext(env.getCustomAttribute("whereTag"));
        env.setCustomAttribute("whereTag", whereContext);
        body.render(stringWriter);
        if (params.size() != 0 && !((Map.Entry)params.entrySet().toArray()[0]).getKey().equals("type"))
        {
            String message = "This directive only takes 'type' with a value of either 'AND' or 'OR'.";
            errors.add(message);
            throw new TemplateModelException(message);
        }
        Object typeParam = params.get("type");
        if (typeParam instanceof TemplateScalarModel)
        {
            TemplateScalarModel typeScalar = (TemplateScalarModel) typeParam;
            if (StringUtils.isNotBlank(typeScalar.getAsString()))
                whereContext.setConnector(typeScalar.getAsString().toUpperCase());
        }
        if (!Arrays.asList("AND", "OR").contains(whereContext.getConnector()))
        {
            String message = "This directive only takes 'type' with a value of either 'AND' or 'OR'.";
            errors.add(message);
            throw new TemplateModelException(message);
        }

        String outputBody = StringUtils.join(whereContext.getFreemarkerWhereClauses(), " " + whereContext.getConnector() + " ");
        if (whereContext.getFreemarkerWhereClauses().size() > 1 && whereContext.getParent() != null && !whereContext.getParent().getConnector().equals(whereContext.getConnector()))
            outputBody = "(" + outputBody + ")";
        if (StringUtils.isNotBlank(outputBody)) {
            if (whereContext.getParent() == null)
                env.getOut().write(" WHERE ");
            if (whereContext.getParent() != null)
                whereContext.getParent().addWhereBody(outputBody);
            else
                env.getOut().write(outputBody);
        }
        env.setCustomAttribute("whereTag", whereContext.getParent());
    }
1242017
private void writeInfo(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets the version of the resource adapter.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return String representing version of the resource adapter\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getAdapterVersion()");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets the name of the vendor that has provided the resource adapter.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return String representing name of the vendor \n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getAdapterVendorName()");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets a tool displayable name of the resource adapter.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return String representing the name of the resource adapter\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getAdapterName()");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Gets a tool displayable short desription of the resource adapter.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return String describing the resource adapter\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getAdapterShortDescription()");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Returns a string representation of the version\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent,
            " * @return String representing the supported version of the connector architecture\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getSpecVersion()");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }
103910
public function setAdapter($adapter)
    {
        if ($adapter == null) {
            $this->adapter = $adapter;
        } else {
              parent::setAdapter($adapter);
        }
    }
448641
@SuppressWarnings("unchecked")
    public void setAdapter(@Nullable AdaptiveTableAdapter adapter) {
        if (mAdapter != null) {
            // remove observers from old adapter
            mAdapter.unregisterDataSetObserver(this);
        }

        if (adapter != null) {
            // wrap adapter
            mAdapter = new LinkedAdaptiveTableAdapterImpl<>(adapter, mSettings.isSolidRowHeader());
            // register notify callbacks
            mAdapter.registerDataSetObserver(this);
            adapter.registerDataSetObserver(new DataSetObserverProxy(mAdapter));
        } else {
            // remove adapter
            mAdapter = null;
        }
        initItems();
    }
694355
void write(ObjectOutputStream out) throws IOException {
        PutField fields = out.putFields();

        fields.put(CONTEXT, threadContextDescriptor.serialize());

        fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties());

        fields.put(INTERNAL_PROP_NAMES, internalPropNames);

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream oout = new ObjectOutputStream(bout);
        oout.writeObject(object);
        oout.flush();
        fields.put(OBJECT, bout.toByteArray());
        oout.close();

        out.writeFields();
    }
1161911
protected void comments(Data data) throws TemplateException {
	data.srcCode.removeSpace();
	while (comment(data)) {
	    data.srcCode.removeSpace();
	}
    }
1162776
public void setAdapter(@NonNull ListAdapter adapter) {
    this.adapter = new MaterialSpinnerAdapterWrapper(getContext(), adapter)
        .setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom)
        .setBackgroundSelector(backgroundSelector)
        .setTextColor(textColor);
    setAdapterInternal(this.adapter);
  }
640499
public static void write(final String templateFilename, final Map<String, Object> data,
            final Writer writer) {
        Template tmpl = null;
        try {
            /*-
             * note that we don't need to cache templates by ourselves since getTemplate() does that internally already
             */
            tmpl = conf.getTemplate(templateFilename);
        } catch (FileNotFoundException e1) {
            String errMsg = "FileNotFoundException: template file '" + templateFilename
                    + "' not found";
            log.error("{}: {}", errMsg, e1.getMessage());
            throw new AwsMockException(errMsg, e1);
        } catch (IOException e) {
            String errMsg = "IOException: failed to getTemplate (filename is " + templateFilename
                    + ")";
            log.error("{}: {}", errMsg, e.getMessage());
            throw new AwsMockException(errMsg, e);
        }

        try {
            tmpl.process(data, writer);
        } catch (TemplateException e) {
            StringBuilder dataDescription = new StringBuilder();

            if (null != data) {
                for (Map.Entry<String, Object> entry : data.entrySet()) {
                    dataDescription.append(entry.getKey() + " - " + entry.getValue()).append('\n');
                }
            }
            String errMsg = "TemplateException: failed to process template '" + templateFilename
                    + "', with data: "
                    + dataDescription.toString()
                    + " The probable cause could be un-matching of key-values for that template. ";
            log.error("{}: {}", errMsg, e.getMessage());
            throw new AwsMockException(errMsg, e);
        } catch (IOException e) {
            String errMsg = "IOException: failed to process template and write to writer. ";
            log.error("{}: {}", errMsg, e.getMessage());
            throw new AwsMockException(errMsg, e);
        }

    }
365466
public void updateDebugTemplate(String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
	if (!hasAccess) throw new SecurityException("no access to change debugging settings");

	Element debugging = _getRootElement("debugging");
	// if(template.trim().length()>0)
	debugging.setAttribute("template", template);
    }
492386
private void processTemplateExpressions(ComponentExposedTypeGenerator exposedTypeGenerator,
      TemplateParserResult templateParserResult) {
    for (TemplateExpression expression : templateParserResult.getExpressions()) {
      generateTemplateExpressionMethod(exposedTypeGenerator,
          expression,
          templateParserResult.getTemplateName());
    }

    // Declare methods in the component
    String templateMethods = templateParserResult.getExpressions()
        .stream()
        .map(expression -> "p." + expression.getId())
        .collect(Collectors.joining(", "));

    exposedTypeGenerator.getOptionsBuilder()
        .addStatement("options.registerTemplateMethods($L)", templateMethods);
  }
137754
function (out) {
            // var tplParam = out.templateParam;
            out.enterBlock("classInit");
            this._writeMapInheritance(out, "__$macrolibs", out.templateParam.$macrolibs, "{}");
            out.leaveBlock();
            this.$ClassGenerator._writeClassInit.call(this, out);
        }