/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static boolean isSetDefault(Parameter parameter) { return parameter.getDefault() != null; }
/** * @see org.andromda.metafacades.uml.ParameterFacade#getDefaultValue() */ @Override protected String handleGetDefaultValue() { String defaultValue = this.metaObject.getDefault(); // Put single or double quotes around default in case modeler forgot to do it. Most templates // declare Type parameter = $parameter.defaultValue, requiring quotes around the value if (StringUtils.isNotBlank(defaultValue) && !this.handleIsMany()) { final String typeName = this.metaObject.getType().getName(); if ("String".equals(typeName) && defaultValue.indexOf('"')<0) { defaultValue = '"' + defaultValue + '"'; } else if (("char".equals(typeName) || "Character".equals(typeName)) && defaultValue.indexOf('\'')<0) { defaultValue = "'" + defaultValue.charAt(0) + '\''; } } if (defaultValue==null) {defaultValue="";} return defaultValue; }
/** * @see org.andromda.metafacades.uml.ParameterFacade#getDefaultValue() */ @Override protected String handleGetDefaultValue() { String defaultValue = this.metaObject.getDefault(); // Put single or double quotes around default in case modeler forgot to do it. Most templates // declare Type parameter = $parameter.defaultValue, requiring quotes around the value if (StringUtils.isNotBlank(defaultValue) && !this.handleIsMany()) { final String typeName = this.metaObject.getType().getName(); if ("String".equals(typeName) && defaultValue.indexOf('"')<0) { defaultValue = '"' + defaultValue + '"'; } else if (("char".equals(typeName) || "Character".equals(typeName)) && defaultValue.indexOf('\'')<0) { defaultValue = "'" + defaultValue.charAt(0) + '\''; } } if (defaultValue==null) {defaultValue="";} return defaultValue; }