umbrello/umbrello
JavaCodeGenerator Class Reference
#include <javacodegenerator.h>

Public Member Functions | |
| JavaCodeGenerator (QDomElement &element) | |
| JavaCodeGenerator () | |
| virtual | ~JavaCodeGenerator () |
| virtual QStringList | defaultDatatypes () |
| bool | getAutoGenerateAssocAccessors () |
| bool | getAutoGenerateAttribAccessors () |
| virtual CodeViewerDialog * | getCodeViewerDialog (QWidget *parent, CodeDocument *doc, Settings::CodeViewerState state) |
| bool | getCreateANTBuildFile () |
| JavaCodeGenerationPolicy * | getJavaPolicy () |
| Uml::Programming_Language | getLanguage () |
| CodeDocument * | newClassifierCodeDocument (UMLClassifier *classifier) |
| virtual const QStringList | reservedKeywords () const |
| void | setCreateANTBuildFile (bool buildIt) |
Static Public Member Functions | |
| static QString | fixTypeName (const QString &string) |
| static QString | getListFieldClassName () |
Protected Member Functions | |
| JavaANTCodeDocument * | newANTCodeDocument () |
Detailed Description
Definition at line 27 of file javacodegenerator.h.
Constructor & Destructor Documentation
| JavaCodeGenerator::JavaCodeGenerator | ( | ) |
Constructor.
Definition at line 43 of file javacodegenerator.cpp.
| JavaCodeGenerator::JavaCodeGenerator | ( | QDomElement & | elem | ) |
Constructor.
- Parameters:
-
elem the element of the DOM tree
Definition at line 34 of file javacodegenerator.cpp.
| JavaCodeGenerator::~JavaCodeGenerator | ( | ) | [virtual] |
Destructor.
Definition at line 51 of file javacodegenerator.cpp.
Member Function Documentation
| QStringList JavaCodeGenerator::defaultDatatypes | ( | ) | [virtual] |
Adds Java's primitives as datatypes.
- Returns:
- a string list of Java primitives
Reimplemented from CodeGenerator.
Definition at line 187 of file javacodegenerator.cpp.
IF the type is "string" we need to declare it as the Java Object "String" (there is no string primative in Java).
Same thing again for "bool" to "boolean".
Definition at line 135 of file javacodegenerator.cpp.
| bool JavaCodeGenerator::getAutoGenerateAssocAccessors | ( | ) |
A utility method to get the javaCodeGenerationPolicy()->getAutoGenerateAssocAccessors() value.
Definition at line 117 of file javacodegenerator.cpp.
| bool JavaCodeGenerator::getAutoGenerateAttribAccessors | ( | ) |
A utility method to get the javaCodeGenerationPolicy()->getAutoGenerateAttribAccessors() value.
Definition at line 109 of file javacodegenerator.cpp.
| CodeViewerDialog * JavaCodeGenerator::getCodeViewerDialog | ( | QWidget * | parent, | |
| CodeDocument * | doc, | |||
| Settings::CodeViewerState | state | |||
| ) | [virtual] |
Get the editing dialog for this code document.
In the Java version, we make the ANT build file also available.
Reimplemented from CodeGenerator.
Definition at line 89 of file javacodegenerator.cpp.
| bool JavaCodeGenerator::getCreateANTBuildFile | ( | ) |
Get the value of m_createANTBuildFile.
- Returns:
- the value of m_createANTBuildFile
Definition at line 80 of file javacodegenerator.cpp.
| JavaCodeGenerationPolicy * JavaCodeGenerator::getJavaPolicy | ( | ) |
Utility function for getting the java code generation policy.
Definition at line 101 of file javacodegenerator.cpp.
| Uml::Programming_Language JavaCodeGenerator::getLanguage | ( | ) | [virtual] |
Return "Java".
- Returns:
- programming language identifier
Implements CodeGenerator.
Definition at line 59 of file javacodegenerator.cpp.
| QString JavaCodeGenerator::getListFieldClassName | ( | ) | [static] |
Get the list variable class name to use.
For Java, we have set this to "Vector".
Definition at line 125 of file javacodegenerator.cpp.
| JavaANTCodeDocument * JavaCodeGenerator::newANTCodeDocument | ( | ) | [protected] |
Create the codeblock that will represent the class declaration for this classifier.
Create ANT code document.
- Returns:
- JavaANTCodeDocument object
Definition at line 150 of file javacodegenerator.cpp.
| CodeDocument * JavaCodeGenerator::newClassifierCodeDocument | ( | UMLClassifier * | classifier | ) | [virtual] |
Create a classifier code document.
- Parameters:
-
classifier the UML classifier
- Returns:
- the created classifier code document
Implements CodeGenerator.
Definition at line 160 of file javacodegenerator.cpp.
| const QStringList JavaCodeGenerator::reservedKeywords | ( | ) | const [virtual] |
Get list of reserved keywords.
- Returns:
- the string list of reserved keywords for Java
Reimplemented from CodeGenerator.
Definition at line 206 of file javacodegenerator.cpp.
| void JavaCodeGenerator::setCreateANTBuildFile | ( | bool | buildIt | ) |
Set the value of m_createANTBuildFile.
- Parameters:
-
buildIt the new value of m_createANTBuildFile
Definition at line 68 of file javacodegenerator.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference