org.jaffa.tools.common
Class SourceDecomposer

java.lang.Object
  extended byorg.jaffa.tools.common.SourceDecomposer

public class SourceDecomposer
extends Object

This class will decompose a file into a collection of GuardedBlock, GuardedBorder and PlainText objects. The file will have to be created/views within NetBeans/Forte to appreciate the significance of these different objects. A GuardedBlock is a piece of text which cannot be modified in the NetBeans editor. A GuardedBorder marks a block where custom code can be entered in the NetBeans editor. A PlainText is just some text, which is not guarded.


Nested Class Summary
static class SourceDecomposer.GuardedBlock
          For the input file, a GuardedBlock object will represent text, which cannot be modified in the NetBeans editor.
static class SourceDecomposer.GuardedBorder
          For the input file, a GuardedBorder object will represent a block where custom code can be entered in the NetBeans editor.
static class SourceDecomposer.PlainText
          For the input file, a PlainText object will represent text, which is not guarded.
 
Constructor Summary
SourceDecomposer(BufferedReader reader)
          This will create an instance of the class.
 
Method Summary
 Collection getCollection()
          Returns the Collection of the decomposed stream elements.
 SourceDecomposer.GuardedBorder getGuardedBorder(String key)
          Returns a GuardedBorder object for the input key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceDecomposer

public SourceDecomposer(BufferedReader reader)
                 throws IOException,
                        SourceDecomposerException
This will create an instance of the class. It will decompose the file passed via the input Reader.

Parameters:
reader - The input file passed as a stream.
Throws:
IOException - if any IO error occurs
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.
Method Detail

getCollection

public Collection getCollection()
Returns the Collection of the decomposed stream elements.

Returns:
the Collection of the decomposed stream elements.

getGuardedBorder

public SourceDecomposer.GuardedBorder getGuardedBorder(String key)
Returns a GuardedBorder object for the input key. A null will be returned if no such object exists.

Parameters:
key - the input.
Returns:
a GuardedBorder object for the input key.


Copyright © 2002-2004 JAFFA Project.