class Fragment {

    public static final Fragment EMPTY_FRAGMENT = new Fragment();

    private final TemplateModel templateModel;
    private final Map<String,Object> parameters;
    private final boolean syntheticParameters;


    public Fragment(
            final TemplateModel templateModel, final Map<String, Object> parameters,
            final boolean syntheticParameters) {
        super();
        Validate.notNull(templateModel, "Template model cannot be null");
        this.templateModel = templateModel;
        this.parameters = parameters != null ? Collections.unmodifiableMap(parameters) : null;
        this.syntheticParameters = (this.parameters != null && this.parameters.size() > 0 && syntheticParameters);
    }


    // Creates the empty Fragment
    private Fragment() {
        super();
        this.templateModel = null;
        this.parameters = null;
        this.syntheticParameters = false;
    }


    public TemplateModel getTemplateModel() {
        return this.templateModel;
    }

    public Map<String, Object> getParameters() {
        return this.parameters;
    }

    public boolean hasSyntheticParameters() {
        return this.syntheticParameters;
    }


    public void write(final Writer writer) throws IOException {
        if (this.templateModel != null) {
            this.templateModel.write(writer);
        }
    }


    @Override
    public String toString() {<FILL_FUNCTION_BODY>}


}

        final Writer stringWriter = new FastStringWriter();
        try {
            write(stringWriter);
        } catch (final IOException e) {
            throw new TemplateProcessingException("Exception while creating String representation of model entity", e);
        }
        return stringWriter.toString();
    
<no_super_class>