Package org.nuiton.eugene.java.extension
Class CodesManagerExtension
- java.lang.Object
-
- org.nuiton.eugene.java.extension.CodesManagerExtension
-
public class CodesManagerExtension extends Object
Object model extensions to manage verbatim code to attzach to operations.- Since:
- 2.0.2
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
CodesManager
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,CodesManager>
managers
Map of CodesManager with key equals to the classifier qualified name associated to the CodesManagerstatic String
OBJECTMODEL_EXTENSION
Extension static used to identify CodesManagerExtension in ObjectModel
-
Constructor Summary
Constructors Constructor Description CodesManagerExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addcode(ObjectModelClassifier classifier, ObjectModelOperation operation, String code)
Add thecode
for the givenoperation
of the givenclassifier
.String
getCode(ObjectModelClassifier classifier, ObjectModelOperation operation)
Get body code for a operation of the given classifier.CodesManager
getManager(ObjectModelClassifier classifier)
Get the CodesManager associated to the classifier.protected Map<String,CodesManager>
getManagers()
-
-
-
Field Detail
-
OBJECTMODEL_EXTENSION
public static final String OBJECTMODEL_EXTENSION
Extension static used to identify CodesManagerExtension in ObjectModel- See Also:
- Constant Field Values
-
managers
protected Map<String,CodesManager> managers
Map of CodesManager with key equals to the classifier qualified name associated to the CodesManager
-
-
Method Detail
-
addcode
public void addcode(ObjectModelClassifier classifier, ObjectModelOperation operation, String code)
Add thecode
for the givenoperation
of the givenclassifier
.- Parameters:
classifier
- the classifier container of the operationoperation
- the operation on which to add the codecode
- the code to add for the operation
-
getCode
public String getCode(ObjectModelClassifier classifier, ObjectModelOperation operation)
Get body code for a operation of the given classifier. The CodesManager must be defined in the model.- Parameters:
classifier
- reference for the codesoperation
- the operation to seek- Returns:
- the body code of the method
-
getManager
public CodesManager getManager(ObjectModelClassifier classifier)
Get the CodesManager associated to the classifier. Note: If not exist, it will be created.- Parameters:
classifier
- reference for the ImportsManager- Returns:
- the codesManager associated to the classifier (never null)
-
getManagers
protected Map<String,CodesManager> getManagers()
-
-