org.argouml.uml.generator
Class SourceUnit

java.lang.Object
  extended by org.argouml.uml.generator.SourceUnit

public class SourceUnit
extends java.lang.Object

Information about a source unit and its content, whether it exists only in memory or it's stored in a file. TODO: Making this an interface instead of a class would allow more flexibility in dealing with non-file-based resources. - tfm


Field Summary
static java.lang.String FILE_SEPARATOR
          The file seperator for this operating system.
 
Constructor Summary
SourceUnit(java.lang.String fullName, java.lang.String theContent)
           
SourceUnit(java.lang.String theName, java.lang.String path, java.lang.String theContent)
           
 
Method Summary
 java.lang.String getBasePath()
           
 java.lang.String getContent()
           
 java.lang.String getFullName()
           
 Language getLanguage()
           
 java.lang.String getName()
           
 void setBasePath(java.lang.String path)
           
 void setContent(java.lang.String theContent)
           
 void setFullName(java.lang.String path)
           
 void setLanguage(Language lang)
           
 void setName(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SEPARATOR

public static final java.lang.String FILE_SEPARATOR
The file seperator for this operating system.

Constructor Detail

SourceUnit

public SourceUnit(java.lang.String theName,
                  java.lang.String path,
                  java.lang.String theContent)
Parameters:
theName - Name of the unit.
path - The path relative to the project source path.
theContent - The source code of the unit.

SourceUnit

public SourceUnit(java.lang.String fullName,
                  java.lang.String theContent)
Parameters:
fullName - Name with path relative to the project source path.
theContent - The source code of the unit.
Method Detail

getContent

public java.lang.String getContent()
Returns:
Returns the source code of the unit.

setContent

public void setContent(java.lang.String theContent)
Parameters:
theContent - The source code for this unit.

getName

public java.lang.String getName()
Returns:
Returns the file name of this unit, without path.

setName

public void setName(java.lang.String filename)
Parameters:
filename - The file name of this unit, without path.

getBasePath

public java.lang.String getBasePath()
Returns:
Returns The base path of the unit (relative to the project source path).

setBasePath

public void setBasePath(java.lang.String path)
Parameters:
path - The base path of the unit (relative to the project source path).

getFullName

public java.lang.String getFullName()
Returns:
Returns The name with path of the unit (relative to the project source path).

setFullName

public void setFullName(java.lang.String path)
Parameters:
path - The full name (with path) of the unit, relative to the project source path.

getLanguage

public Language getLanguage()
Returns:
Returns the language.

setLanguage

public void setLanguage(Language lang)
Parameters:
lang - The language to set.


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook