umbrello: JavaImport Class Reference

umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Member Functions | List of all members
JavaImport Class Reference

`#include <javaimport.h>`

Inheritance diagram for JavaImport:

## Public Member Functions
| JavaImport (CodeImpThread *thread=0)
virtual | ~JavaImport ()
Public Member Functions inherited from NativeImportBase
| NativeImportBase (const QString &singleLineCommentIntro, CodeImpThread *thread=0)
virtual | ~NativeImportBase ()
Public Member Functions inherited from ClassImport
| ClassImport (CodeImpThread *thread=0)
virtual | ~ClassImport ()
bool | importFiles (const QStringList &fileNames)
bool | importFile (const QString &fileName)
void | setRootPath (const QString &path)
bool | enabled () const

## Protected Member Functions
void | initVars ()
bool | parseStmt ()
void | fillSource (const QString &word)
bool | parseFile (const QString &filename)
UMLObject * | resolveClass (const QString &className)
void | spawnImport (const QString &file)
QString | joinTypename (const QString &typeName)
Protected Member Functions inherited from NativeImportBase
void | initialize ()
void | setMultiLineComment (const QString &intro, const QString &end)
void | setMultiLineAltComment (const QString &intro, const QString &end)
virtual bool | parseFile (const QString &filename)
virtual void | initVars ()
void | scan (const QString &line)
virtual bool | preprocess (QString &line)
virtual QStringList | split (const QString &line)
virtual void | fillSource (const QString &word)=0
virtual bool | parseStmt ()=0
void | skipStmt (const QString &until=QLatin1String(";"))
bool | skipToClosing (QChar opener)
QString | lookAhead ()
virtual QString | advance ()
void | pushScope (UMLPackage *p)
UMLPackage * | popScope ()
UMLPackage * | currentScope ()
int | scopeIndex ()
Protected Member Functions inherited from ClassImport
virtual void | initialize ()=0
virtual void | initPerFile ()
virtual bool | parseFile (const QString &fileName)=0
void | log (const QString &file, const QString &text)
void | log (const QString &text)

## Protected Attributes
bool | m_isStatic
| static flag for the member var or method More...
QString | m_currentFileName
| current filename being parsed More...
QString | m_currentPackage
| current package of the file being parsed More...
QStringList | m_imports
| imports included in the current file More...
Uml::Visibility::Enum | m_defaultCurrentAccess
| current visibility for when the visibility is absent More...
Protected Attributes inherited from NativeImportBase
QString | m_singleLineCommentIntro
| start token of a single line comment More...
QStringList | m_source
| the scanned lexemes More...
int | m_srcIndex
| used for indexing m_source More...
QList< UMLPackage * > | m_scope
| stack of scopes for use by the specific importer More...
UMLClassifier * | m_klass
| class currently being processed More...
Uml::Visibility::Enum | m_currentAccess
| current access (public/protected/private) More...
QString | m_comment
| intermediate accumulator for comment text More...
bool | m_inComment
bool | m_isAbstract
| accumulator for abstractness More...
QString | m_multiLineCommentIntro
| multi line comment delimiter intro More...
QString | m_multiLineCommentEnd
| multi line comment delimiter end More...
QString | m_multiLineAltCommentIntro
QString | m_multiLineAltCommentEnd
Protected Attributes inherited from ClassImport
CodeImpThread * | m_thread
| thread in which the work of importing is done More...
bool | m_enabled
| state of importer More...
QString | m_rootPath
| root path of import More...

## Static Protected Attributes
static QStringList | s_filesAlreadyParsed
static int | s_parseDepth = 0
Static Protected Attributes inherited from NativeImportBase
static QStringList | m_parsedFiles

## Static Private Member Functions
static UMLObject * | findObject (const QString &name, UMLPackage *parentPkg)

## Additional Inherited Members
Static Public Member Functions inherited from ClassImport
static ClassImport * | createImporterByFileExt (const QString &fileName, CodeImpThread *thread=0)

## Detailed Description

Java code import

Author
  Oliver Kellogg
  JP Fournier Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Constructor & Destructor Documentation

## ◆ JavaImport()

JavaImport::JavaImport | ( | CodeImpThread * | thread = `0` | ) |
| explicit

Constructor.

## ◆ ~JavaImport()

JavaImport::~JavaImport | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ fillSource()

void JavaImport::fillSource | ( | const QString & | word | ) |
| protectedvirtual

Implement abstract operation from NativeImportBase.

Parameters

  word | whitespace delimited item

Implements NativeImportBase.

## ◆ findObject()

UMLObject * JavaImport::findObject | ( | const QString & | name,
|  | UMLPackage * | parentPkg
| ) |  |
| staticprivate

Returns the UML Object if found, or null otherwise.

Parameters

  name | name of the uml object
  parentPkg | parent package

Returns
  null or the uml objecct

## ◆ initVars()

void JavaImport::initVars | ( |  | ) |
| protectedvirtual

Reimplement operation from NativeImportBase.

Reimplemented from NativeImportBase.

## ◆ joinTypename()

QString JavaImport::joinTypename | ( | const QString & | typeName | ) |
| protected

Figure out if the type is really an array or template of the given typeName. Catenate possible template arguments/array dimensions to the end of the type name.

Parameters

  typeName | the type name

Returns
  the type name with the additional information

## ◆ parseFile()

bool JavaImport::parseFile | ( | const QString & | filename | ) |
| protectedvirtual

Keep track of the current file being parsed and reset the list of imports.

Parameters

  filename | the name of the file being parsed

Reimplemented from NativeImportBase.

## ◆ parseStmt()

bool JavaImport::parseStmt | ( |  | ) |
| protectedvirtual

Implement abstract operation from NativeImportBase.

Returns
  success status of operation

Implements NativeImportBase.

## ◆ resolveClass()

UMLObject * JavaImport::resolveClass | ( | const QString & | className | ) |
| protected

Try to resolve the specified class the current class depends on.

Parameters

  className | the name of the class

## ◆ spawnImport()

void JavaImport::spawnImport | ( | const QString & | file | ) |
| protected

Spawn off an import of the specified file.

Parameters

  file | the specified file

## Member Data Documentation

## ◆ m_currentFileName

QString JavaImport::m_currentFileName
| protected

current filename being parsed

## ◆ m_currentPackage

QString JavaImport::m_currentPackage
| protected

current package of the file being parsed

## ◆ m_defaultCurrentAccess

Uml::Visibility::Enum JavaImport::m_defaultCurrentAccess
| protected

current visibility for when the visibility is absent

## ◆ m_imports

QStringList JavaImport::m_imports
| protected

imports included in the current file

## ◆ m_isStatic

bool JavaImport::m_isStatic
| protected

static flag for the member var or method

## ◆ s_filesAlreadyParsed

QStringList JavaImport::s_filesAlreadyParsed
| staticprotected

Keep track of the files we have already parsed so we don't reparse the same ones over and over again.

## ◆ s_parseDepth

int JavaImport::s_parseDepth = 0
| staticprotected

Keep track of the parses so that the filesAlreadyParsed can be reset when we're done.

The documentation for this class was generated from the following files:

- umbrello/codeimport/javaimport.h
- umbrello/codeimport/javaimport.cpp