class ProcessingInstruction extends AbstractTemplateEvent implements IProcessingInstruction, IEngineTemplateEvent {

    private final String target;
    private final String content;

    private final String processingInstruction;




    ProcessingInstruction(
            final String target,
            final String content) {
        super();
        this.target = target;
        this.content = content;
        this.processingInstruction = computeProcessingInstruction();
    }


    ProcessingInstruction(
            final String processingInstruction,
            final String target,
            final String content,
            final String templateName, final int line, final int col) {
        super(templateName, line, col);
        this.target = target;
        this.content = content;
        this.processingInstruction = (processingInstruction != null? processingInstruction : computeProcessingInstruction());
    }




    public String getTarget() {
        return this.target;
    }

    public String getContent() {
        return this.content;
    }

    public String getProcessingInstruction() {
        return this.processingInstruction;
    }



    private String computeProcessingInstruction() {

        final StringBuilder strBuilder = new StringBuilder(100);

        strBuilder.append("<?");
        strBuilder.append(this.target);
        if (this.content != null) {
            strBuilder.append(' ');
            strBuilder.append(this.content);
        }
        strBuilder.append("?>");

        return strBuilder.toString();

    }




    public void accept(final IModelVisitor visitor) {
        visitor.visit(this);
    }


    public void write(final Writer writer) throws IOException {
        writer.write(this.processingInstruction);
    }




    static ProcessingInstruction asEngineProcessingInstruction(final IProcessingInstruction processingInstruction) {<FILL_FUNCTION_BODY>}




    @Override
    public void beHandled(final ITemplateHandler handler) {
        handler.handleProcessingInstruction(this);
    }




    @Override
    public String toString() {
        return getProcessingInstruction();
    }


}


        if (processingInstruction instanceof ProcessingInstruction) {
            return (ProcessingInstruction) processingInstruction;
        }

        return new ProcessingInstruction(
                null,
                processingInstruction.getTarget(), processingInstruction.getContent(),
                processingInstruction.getTemplateName(), processingInstruction.getLine(), processingInstruction.getCol());

    
<methods>public final int getCol() ,public final int getLine() ,public final java.lang.String getTemplateName() ,public final boolean hasLocation() <variables>final non-sealed int col,final non-sealed int line,final non-sealed java.lang.String templateName