org.argouml.language.java.generator
Class SimpleCodePiece

java.lang.Object
  extended byorg.argouml.language.java.generator.CodePiece
      extended byorg.argouml.language.java.generator.SimpleCodePiece

public class SimpleCodePiece
extends CodePiece

This piece of code is just one token.


Field Summary
private  int endPosition
           
private  int line
           
private  int startPosition
           
private  StringBuffer text
           
 
Constructor Summary
SimpleCodePiece(StringBuffer t, int lne, int sp, int ep)
          Create a simple piece of code.
SimpleCodePiece(antlr.Token token)
          Create a simple piece of code from a token.
 
Method Summary
 int getEndLine()
          Return the end line
 int getEndPosition()
          Return the end position.
 int getStartLine()
          Return the start line
 int getStartPosition()
          Return the start position.
 StringBuffer getText()
          Return the string representation for this piece of code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

private StringBuffer text

line

private int line

startPosition

private int startPosition

endPosition

private int endPosition
Constructor Detail

SimpleCodePiece

public SimpleCodePiece(StringBuffer t,
                       int lne,
                       int sp,
                       int ep)
Create a simple piece of code.

Parameters:
t - the text
lne - the line
sp - the start position
ep - the end position

SimpleCodePiece

public SimpleCodePiece(antlr.Token token)
Create a simple piece of code from a token.

Parameters:
token - the given token
Method Detail

getText

public StringBuffer getText()
Return the string representation for this piece of code.

Specified by:
getText in class CodePiece
Returns:
the string representation for this piece of code
See Also:
CodePiece.getText()

getStartPosition

public int getStartPosition()
Return the start position.

Specified by:
getStartPosition in class CodePiece
Returns:
the start position
See Also:
CodePiece.getStartPosition()

getEndPosition

public int getEndPosition()
Return the end position.

Specified by:
getEndPosition in class CodePiece
Returns:
the end position
See Also:
CodePiece.getEndPosition()

getStartLine

public int getStartLine()
Return the start line

Specified by:
getStartLine in class CodePiece
Returns:
the start line
See Also:
CodePiece.getStartLine()

getEndLine

public int getEndLine()
Return the end line

Specified by:
getEndLine in class CodePiece
Returns:
the end line
See Also:
CodePiece.getEndLine()


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook