sugar4j.lang
Class Tag

java.lang.Object
  extended by sugar4j.lang.Tag

public class Tag
extends Object

A tag within the code which is replaced by dynamic content after sugar is created.
A tag consists of a name, which designates a placeholder for the tag's content.
I.e. for the ImportManager, the import list is known only after all Sugar4j's content is written. So the ImportManager inserts a tag at the import list's position (at the top) and after all content is created, the tag is replaced by the actual import list.

Version:
$Id: Tag.java,v 1.6 2008/02/13 23:25:38 krizzdewizz Exp $
Author:
krizzdewizz

Nested Class Summary
static interface Tag.Content
          Obtains the tag's content.
 
Constructor Summary
Tag(String name, Tag.Content content)
          Constructor.
 
Method Summary
 Tag.Content getContent()
          Returns the tag's content.
 String getName()
          Returns the name of the tag.
 String replace(String content)
           
 

Constructor Detail

Tag

public Tag(String name,
           Tag.Content content)
Constructor.

Parameters:
name -
content -
Method Detail

getName

public String getName()
Returns the name of the tag.

Returns:
String

getContent

public Tag.Content getContent()
Returns the tag's content.

Returns:
String

replace

public String replace(String content)