org.jostraca.section
Interface Section

All Known Implementing Classes:
BasicSection

public interface Section

Description:
A section represents a block of source code in the CodeWriter.


Field Summary
static java.lang.String DEFAULT_NAME
           
static java.lang.String MN_append
           
static java.lang.String MN_prepend
           
static java.lang.String NAME_body
           
static java.lang.String NAME_declare
           
static java.lang.String NAME_documentation
           
static java.lang.String NAME_init
           
 
Method Summary
 void append(java.lang.String pContent)
          Append content to a section.
 void clear()
          Clear section content.
 boolean equals(java.lang.Object pObject)
          Test for equality
 java.lang.String getContent()
          Get section content.
 java.lang.String getName()
          Get name of section.
 boolean isEmpty()
          True if Section content is empty String.
 void prepend(java.lang.String pContent)
          prepend content to a section.
 void setContent(java.lang.String pContent)
          Set content of section.
 

Field Detail

DEFAULT_NAME

public static final java.lang.String DEFAULT_NAME
See Also:
Constant Field Values

NAME_init

public static final java.lang.String NAME_init
See Also:
Constant Field Values

NAME_body

public static final java.lang.String NAME_body
See Also:
Constant Field Values

NAME_declare

public static final java.lang.String NAME_declare
See Also:
Constant Field Values

NAME_documentation

public static final java.lang.String NAME_documentation
See Also:
Constant Field Values

MN_append

public static final java.lang.String MN_append
See Also:
Constant Field Values

MN_prepend

public static final java.lang.String MN_prepend
See Also:
Constant Field Values
Method Detail

prepend

public void prepend(java.lang.String pContent)
prepend content to a section.

Parameters:
pContent - content to prepend (if null, then "")

append

public void append(java.lang.String pContent)
Append content to a section.

Parameters:
pContent - content to append (if null, then "")

clear

public void clear()
Clear section content.


getContent

public java.lang.String getContent()
Get section content. Contract: Always returns a String even if empty.


setContent

public void setContent(java.lang.String pContent)
Set content of section.

Parameters:
pContent - full content (if null, then "")

getName

public java.lang.String getName()
Get name of section. Contract: Name =~ /^[0-9a-zA-Z_-]+$/


isEmpty

public boolean isEmpty()
True if Section content is empty String.


equals

public boolean equals(java.lang.Object pObject)
Test for equality



Copyright © 2000-2002 Richard Rodger