Package org.nuiton.eugene.java.extension
Class ImportsManagerExtension
- java.lang.Object
-
- org.nuiton.eugene.java.extension.ImportsManagerExtension
-
public class ImportsManagerExtension extends Object
Extension for ObjectModel to manage imports for all classifiers in the model. Created: 2 nov. 2009- Author:
- Florian Desbois - desbois@codelutin.com, Tony Chemit - chemit@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ImportsManager>
managers
Map of ImportsManager with key equals to the classifier qualified name associated to the ImportsManager.static String
OBJECTMODEL_EXTENSION
Extension static used to identify ImportsManagerExtension in ObjectModel
-
Constructor Summary
Constructors Constructor Description ImportsManagerExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getImports(String fqn, String packageName)
Get imports for a classifier.List<String>
getImports(ObjectModelClassifier classifier)
Get imports for a classifier.ImportsManager
getManager(String fqn)
Get the ImportsManager associated to the givenfqn
.ImportsManager
getManager(ObjectModelClassifier classifier)
Get the ImportsManager associated to the classifier.protected Map<String,ImportsManager>
getManagers()
-
-
-
Field Detail
-
OBJECTMODEL_EXTENSION
public static final String OBJECTMODEL_EXTENSION
Extension static used to identify ImportsManagerExtension in ObjectModel- See Also:
- Constant Field Values
-
managers
protected Map<String,ImportsManager> managers
Map of ImportsManager with key equals to the classifier qualified name associated to the ImportsManager.
-
-
Method Detail
-
getManager
public ImportsManager getManager(ObjectModelClassifier classifier)
Get the ImportsManager associated to the classifier. Note: if not exist, it will be created.- Parameters:
classifier
- reference for the ImportsManager- Returns:
- the importsManager associated to the classifier (never null)
-
getManager
public ImportsManager getManager(String fqn)
Get the ImportsManager associated to the givenfqn
. Note: if not exist, it will be created.- Parameters:
fqn
- reference for the ImportsManager- Returns:
- the importsManager associated to the classifier (never null)
- Since:
- 2.3.2
-
getImports
public List<String> getImports(ObjectModelClassifier classifier)
Get imports for a classifier. The ImportsManager must be defined in the model.- Parameters:
classifier
- reference for the imports- Returns:
- a List of String which contains all imports for the classifier
-
getImports
public List<String> getImports(String fqn, String packageName)
Get imports for a classifier. The ImportsManager must be defined in the model.- Parameters:
fqn
- reference for the importspackageName
- package name of the fqn- Returns:
- a List of String which contains all imports for the classifier
- Since:
- 2.3.2
-
getManagers
protected Map<String,ImportsManager> getManagers()
-
-