Hello,
UML API 1.1.0 has been released.
New feature: com.pavelvlasov.uml.eval package contains classes which allow to wrap Model into Evaluator which will evaluate all Strings returned by interfaces from com.pavelvlasov.uml.
There are four Evaluators shipped with release 1.1.0:
- Fesi evaluator (JavaScript)
- Velocity evaluator
- JXPath evaluator (XPath)
- Composite prefixed evaluator. This evaluator allows to combine multiple evaluators and multiplex them based on expression prefix.
Evaluators allow to templatize UML elements and use appropriate expression language depending on situation.
Example:
There is a class in a model with the name MySimpleBean_${this.id}. Without evaluator Classifier.getName() for this class will return MySimpleBean_${this.id}, but if you wrap Model with VelocityEvaluator then MySimpleBean_EAID_18B6FDC5_4DDE_4a6f_9E35_1AEFEEFB4793 will be returned.
If you use prefixed evaluator and set #velocity: as Velocity evaluator prefix then #velocity:MySimpleBean_${this.id} will be evaluated to MySimpleBean_EAID_18B6FDC5_4DDE_4a6f_9E35_1AEFEEFB4793, but MySimpleBean_${this.id} will not.
Take a look at Pamda forum for possible uses of this new feature.
---
Best regards, Pavel.