org.argouml.language.java.generator
Class CompositeCodePiece

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

public class CompositeCodePiece
extends CodePiece

This piece of code is a composition of several adjacent pieces of code. The code piece can have holes.


Field Summary
private  Vector codePieces
          The code pieces this code piece consists of.
 
Constructor Summary
CompositeCodePiece(CodePiece codePiece)
          Create a composite piece of code.
 
Method Summary
 void add(CodePiece codePiece)
          Append a code piece to the end.
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codePieces

private Vector codePieces
The code pieces this code piece consists of.

Constructor Detail

CompositeCodePiece

public CompositeCodePiece(CodePiece codePiece)
Create a composite piece of code.

Parameters:
codePiece - A starter code piece.
Method Detail

add

public void add(CodePiece codePiece)
Append a code piece to the end.

Parameters:
codePiece - the given codepiece

getText

public StringBuffer getText()
Specified by:
getText in class CodePiece
Returns:
the string representation for this piece of code

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