-
Notifications
You must be signed in to change notification settings - Fork 1
/
association_AddImmutableUnidirectionalMany.jet
16 lines (15 loc) · 1.33 KB
/
association_AddImmutableUnidirectionalMany.jet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%@ jet package="cruise.umple.ignore" class="Ignore"%>
private boolean <%=gen.translate("addMethod",av)%>(<%=gen.translate("type",av)%> <%=gen.translate("parameterOne",av)%>)
{
boolean wasAdded = false;
<% if (customAddPrefixCode != null) { addUncaughtExceptionVariables(stringBuffer.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
append(stringBuffer, "\n{0}",GeneratorHelper.doIndent(customAddPrefixCode, " ")); } %>
<%= gen.translate("attributeCanSet",av) %> = false;
<%for( TraceItem traceItemAssocAdd : traceItemAssocAdds )%><%= (traceItemAssocAdd!=null&&traceItemAssocAdd.getIsPre()?traceItemAssocAdd.trace(gen, av,"as_a", uClass,gen.translate("numberOfMethod",av)+"()")+"\n":"")
%> <%=gen.translate("associationMany",av)%>.add(<%=gen.translate("parameterOne",av)%>);
wasAdded = true;
<%for( TraceItem traceItemAssocAdd : traceItemAssocAdds )%><%= (traceItemAssocAdd!=null&&traceItemAssocAdd.getIsPost()?traceItemAssocAdd.trace(gen, av,"as_a", uClass,gen.translate("numberOfMethod",av)+"()")+"\n":"")
%> <% if (customAddPostfixCode != null) { addUncaughtExceptionVariables(stringBuffer.toString().split("\\n").length,customAddPostfixCode,gen.translate("addMethod",av));
append(stringBuffer, "\n{0}",GeneratorHelper.doIndent(customAddPostfixCode, " ")); } %>
return wasAdded;
}