umbrello: umbrello/codeimport/javaimport.h Source File

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

javaimport.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef JAVAIMPORT_H
12 #define JAVAIMPORT_H
13
14 #include "nativeimportbase.h"
15
16 class UMLObject;
17
24 class JavaImport : public NativeImportBase
25 {
26 public:
27 explicit JavaImport(CodeImpThread* thread = 0);
28 virtual ~JavaImport();
29
30 protected:
31 void initVars();
32
33 bool parseStmt();
34
35 void fillSource(const QString& word);
36
37 bool parseFile(const QString& filename);
38
39 UMLObject* resolveClass (const QString& className);
40
41 void spawnImport(const QString& file);
42
43 QString joinTypename(const QString& typeName);
44
45 bool m_isStatic;
46 QString m_currentFileName;
47 QString m_currentPackage;
48 QStringList m_imports;
49 Uml::Visibility::Enum m_defaultCurrentAccess;
50
55 static QStringList s_filesAlreadyParsed;
56
61 static int s_parseDepth;
62
63 private:
64 static UMLObject* findObject(const QString& name, UMLPackage *parentPkg);
65
66 };
67
68 #endif
69
NativeImportBase::scopeIndex
int scopeIndex()
Definition: nativeimportbase.cpp:176
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1308
javaimport.h
Import_Utils::insertAttribute
UMLAttribute * insertAttribute(UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic)
Definition: import_utils.cpp:426
umlpackagelist.h
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:79
Uml::Visibility::Implementation
@ Implementation
Definition: basictypes.h:80
JavaImport::s_parseDepth
static int s_parseDepth
Definition: javaimport.h:61
UMLClassifier::isInterface
bool isInterface() const
Definition: classifier.cpp:118
ClassImport::log
void log(const QString &file, const QString &text)
Definition: classimport.cpp:133
NativeImportBase::m_currentAccess
Uml::Visibility::Enum m_currentAccess
current access (public/protected/private)
Definition: nativeimportbase.h:99
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
JavaImport::fillSource
void fillSource(const QString &word)
Definition: javaimport.cpp:94
JavaImport::parseFile
bool parseFile(const QString &filename)
Definition: javaimport.cpp:287
JavaImport::m_imports
QStringList m_imports
imports included in the current file
Definition: javaimport.h:48
UMLObject::setStatic
void setStatic(bool bStatic)
Definition: umlobject.cpp:374
JavaImport::initVars
void initVars()
Definition: javaimport.cpp:58
JavaImport::s_filesAlreadyParsed
static QStringList s_filesAlreadyParsed
Definition: javaimport.h:55
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
operation.h
UMLObject::setVisibilityCmd
void setVisibilityCmd(Uml::Visibility::Enum visibility)
Definition: umlobject.cpp:486
JavaImport::findObject
static UMLObject * findObject(const QString &name, UMLPackage *parentPkg)
Definition: javaimport.cpp:148
Import_Utils::createGeneralization
UMLAssociation * createGeneralization(UMLClassifier *child, UMLClassifier *parent)
Definition: import_utils.cpp:603
JavaImport::spawnImport
void spawnImport(const QString &file)
Definition: javaimport.cpp:126
object_factory.h
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:86
Import_Utils::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype, bool searchInParentPackageOnly, bool remapParent)
Definition: import_utils.cpp:178
NativeImportBase::m_klass
UMLClassifier * m_klass
class currently being processed
Definition: nativeimportbase.h:98
UMLPackage::containedObjects
UMLObjectList & containedObjects()
Definition: package.cpp:228
UMLObject::ot_Package
@ ot_Package
Definition: umlobject.h:85
Import_Utils::insertMethod
void insertMethod(UMLClassifier *klass, UMLOperation *&op, Uml::Visibility::Enum scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, bool isDestructor, const QString &comment)
Definition: import_utils.cpp:498
JavaImport
Definition: javaimport.h:24
UMLObject::ot_UMLObject
@ ot_UMLObject
Definition: umlobject.h:82
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
NativeImportBase::setMultiLineComment
void setMultiLineComment(const QString &intro, const QString &end)
Definition: nativeimportbase.cpp:59
import_utils.h
UMLObject::asUMLEnum
UMLEnum * asUMLEnum()
Definition: umlobject.cpp:1315
NativeImportBase::currentScope
UMLPackage * currentScope()
Definition: nativeimportbase.cpp:165
NativeImportBase::skipStmt
void skipStmt(const QString &until=QLatin1String(";"))
Definition: nativeimportbase.cpp:82
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
Import_Utils::remapUMLEnum
UMLEnum * remapUMLEnum(UMLObject *ns, UMLPackage *currentScope)
Definition: import_utils.cpp:738
NativeImportBase::skipToClosing
bool skipToClosing(QChar opener)
Definition: nativeimportbase.cpp:97
JavaImport::resolveClass
UMLObject * resolveClass(const QString &className)
Definition: javaimport.cpp:159
NativeImportBase::m_isAbstract
bool m_isAbstract
accumulator for abstractness
Definition: nativeimportbase.h:107
attribute.h
NativeImportBase::popScope
UMLPackage * popScope()
Definition: nativeimportbase.cpp:153
NativeImportBase::m_source
QStringList m_source
the scanned lexemes
Definition: nativeimportbase.h:95
JavaImport::m_defaultCurrentAccess
Uml::Visibility::Enum m_defaultCurrentAccess
current visibility for when the visibility is absent
Definition: javaimport.h:49
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
UMLClassifier::setBaseType
void setBaseType(UMLObject::ObjectType ot)
Definition: classifier.cpp:83
Import_Utils::addMethodParameter
UMLAttribute * addMethodParameter(UMLOperation *method, const QString &type, const QString &name)
Definition: import_utils.cpp:572
uDebug
#define uDebug()
Definition: debug_utils.h:122
NativeImportBase::advance
virtual QString advance()
Definition: nativeimportbase.cpp:198
JavaImport::m_currentFileName
QString m_currentFileName
current filename being parsed
Definition: javaimport.h:46
JavaImport::~JavaImport
virtual ~JavaImport()
Definition: javaimport.cpp:51
JavaImport::m_isStatic
bool m_isStatic
static flag for the member var or method
Definition: javaimport.h:45
NativeImportBase::m_comment
QString m_comment
intermediate accumulator for comment text
Definition: nativeimportbase.h:100
CodeImpThread
Definition: codeimpthread.h:35
UMLObject::setAbstract
void setAbstract(bool bAbstract)
Definition: umlobject.cpp:356
JavaImport::joinTypename
QString joinTypename(const QString &typeName)
Definition: javaimport.cpp:69
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
Import_Utils::makeOperation
UMLOperation * makeOperation(UMLClassifier *parent, const QString &name)
Definition: import_utils.cpp:416
UMLDoc
Definition: umldoc.h:74
NativeImportBase
Base class for native implementations of language import.
Definition: nativeimportbase.h:44
Uml
Definition: basictypes.cpp:36
nativeimportbase.h
NativeImportBase::parseFile
virtual bool parseFile(const QString &filename)
Definition: nativeimportbase.cpp:417
Uml::Visibility::Enum
Enum
Definition: basictypes.h:76
UMLObject::setDoc
void setDoc(const QString &d)
Definition: umlobject.cpp:455
ClassImport::importFiles
bool importFiles(const QStringList &fileNames)
Definition: classimport.cpp:92
Import_Utils::addEnumLiteral
void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment, const QString &value)
Definition: import_utils.cpp:593
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1065
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:24
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
Object_Factory::createNewUMLObject
UMLObject * createNewUMLObject(UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg, bool undoable)
Definition: object_factory.cpp:103
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:615
debug_utils.h
NativeImportBase::pushScope
void pushScope(UMLPackage *p)
Definition: nativeimportbase.cpp:143
NativeImportBase::split
virtual QStringList split(const QString &line)
Definition: nativeimportbase.cpp:324
UMLObject::asUMLPackage
UMLPackage * asUMLPackage()
Definition: umlobject.cpp:1324
JavaImport::m_currentPackage
QString m_currentPackage
current package of the file being parsed
Definition: javaimport.h:47
Uml::Visibility::Private
@ Private
Definition: basictypes.h:78
NativeImportBase::m_srcIndex
int m_srcIndex
used for indexing m_source
Definition: nativeimportbase.h:96
package.h
JavaImport::JavaImport
JavaImport(CodeImpThread *thread=0)
Definition: javaimport.cpp:40
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:79
codeimpthread.h
UMLObject::isUMLPackage
bool isUMLPackage()
Definition: umlobject.h:219
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:28
JavaImport::parseStmt
bool parseStmt()
Definition: javaimport.cpp:319
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
umldoc.h
UMLClassifier::addTemplate
UMLTemplate * addTemplate(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: classifier.cpp:1024
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32
enum.h