org.argouml.language.java.generator
Class AnonymousClassCodePiece

java.lang.Object
  extended byorg.argouml.language.java.generator.CodePiece
      extended byorg.argouml.language.java.generator.NamedCodePiece
          extended byorg.argouml.language.java.generator.AnonymousClassCodePiece

public class AnonymousClassCodePiece
extends NamedCodePiece

This code piece represents an anonymous class.


Field Summary
private  CodePiece classDef
          The code piece this class represents.
private  int number
          The sequence number of this anonymous class.
 
Constructor Summary
AnonymousClassCodePiece(CodePiece classDef, int number)
          Constructor.
 
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.
 java.lang.StringBuffer getText()
          Return the string representation for this piece of code.
 void write(java.io.BufferedReader reader, java.io.BufferedWriter writer, java.util.Stack parseStateStack)
          Write the code this piece represents to file.
 
Methods inherited from class org.argouml.language.java.generator.NamedCodePiece
ffCodePiece
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classDef

private CodePiece classDef
The code piece this class represents.


number

private int number
The sequence number of this anonymous class.

Constructor Detail

AnonymousClassCodePiece

public AnonymousClassCodePiece(CodePiece classDef,
                               int number)
Constructor.

Parameters:
classDef - The code piece to represent.
number - The sequence number of this anonymous class.
Method Detail

getText

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

Specified by:
getText in class CodePiece

getStartPosition

public int getStartPosition()
Return the start position.

Specified by:
getStartPosition in class CodePiece

getEndPosition

public int getEndPosition()
Return the end position.

Specified by:
getEndPosition in class CodePiece

getStartLine

public int getStartLine()
Return the start line

Specified by:
getStartLine in class CodePiece

getEndLine

public int getEndLine()
Return the end line

Specified by:
getEndLine in class CodePiece

write

public void write(java.io.BufferedReader reader,
                  java.io.BufferedWriter writer,
                  java.util.Stack parseStateStack)
           throws java.lang.Exception
Write the code this piece represents to file. This will add a new level to the tree stacks.

Specified by:
write in class NamedCodePiece
Parameters:
reader - Read original code from this.
writer - Write code to this.
parseStateStack - Information with one stack frame for each classifier that the parser has descended into.
Throws:
java.lang.Exception


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