miSim

misim.asm
Class AsmLineFactory

java.lang.Object
  |
  +--misim.asm.AsmLineFactory
All Implemented Interfaces:
LineFactory

public class AsmLineFactory
extends java.lang.Object
implements LineFactory

The Line class represents a single line of a file. It may contain zero or more tokens, and may also refer to an included file which itself may contain zero or more lines. Note that the tokens represent the text part of the file. Additional data is transient and created during assembly or other forms of processing of the file. The tokens are stored as a vector, which is immutable - all edit functions remove the existing vector and replace it with an appropriate new one. This appears heavy handed, but allows undo events to be stored simply by storing the token vector from the line being altered.


Constructor Summary
AsmLineFactory()
           
 
Method Summary
 Line createLine()
          Create an instance of a Line with no tokens - ie.
 Line createLine(java.util.Vector tokens)
          Create an instance of a Line with the given set of tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsmLineFactory

public AsmLineFactory()
Method Detail

createLine

public Line createLine()
Create an instance of a Line with no tokens - ie. an empty line
Specified by:
createLine in interface LineFactory
Returns:
An instance of the Line class

createLine

public Line createLine(java.util.Vector tokens)
Create an instance of a Line with the given set of tokens.
Specified by:
createLine in interface LineFactory
Parameters:
tokens - A vector of tokens for this line
Returns:
An instance of the Line class

miSim