1 28 29 package org.objectweb.openccm.uml.transformation.rules.xml; 30 31 import ispuml.mdaTransformation.RuleContext; 32 import ispuml.mdaTransformation.TransformationException; 33 import ispuml.mdaTransformation.rules.xml.XmlAction; 34 35 40 public class RemoveArrayBracket extends XmlAction { 41 42 43 46 public RemoveArrayBracket () { 47 super(); 48 } 49 50 53 public Object execute(Object bean, RuleContext context) throws TransformationException { 54 if (bean instanceof org.omg.uml.core.DataType) { 55 org.omg.uml.core.DataType dt = (org.omg.uml.core.DataType)bean; 56 dt.setName(dt.getName().substring(0, dt.getName().lastIndexOf("[]"))); 57 } 58 return bean; 59 } 60 61 } 62 | Popular Tags |