Package org.eclipse.jface.text.templates

# Class TemplateBuffer

java.lang.Object
org.eclipse.jface.text.templates.TemplateBuffer

public final class TemplateBuffer extends Object
A template buffer is a container for a string and variables.

Clients may instantiate this class.

Since:
  3.0

## Constructor Summary

Constructors
Constructor
Description
`TemplateBuffer(String string, TemplateVariable[] variables)`
Creates a template buffer.

## Method Summary

Modifier and Type
Method
Description
`final String`
`getString()`
Returns the string of the template buffer.
`final TemplateVariable[]`
`getVariables()`
Returns the variable positions of the template buffer.
`final void`
`setContent(String string, TemplateVariable[] variables)`
Sets the content of the template buffer.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TemplateBuffer

public TemplateBuffer(String string, TemplateVariable[] variables)
Creates a template buffer.

Parameters:
  `string` - the string
  `variables` - the variable positions

## Method Details

### setContent

public final void setContent(String string, TemplateVariable[] variables)
Sets the content of the template buffer.

Parameters:
  `string` - the string
  `variables` - the variable positions

### getString

public final String getString()
Returns the string of the template buffer.

Returns:
  the string representation of the template buffer

### getVariables

public final TemplateVariable[] getVariables()
Returns the variable positions of the template buffer. The returned array is owned by this variable and must not be modified.

Returns:
  the variable positions of the template buffer