/********************************************************************* * The constructor ********************************************************************/ public OJIfStatement() { super(); this.setThenPart(new OJBlock()); }
public OJIfStatement(String condition) { this.setThenPart(new OJBlock()); this.setCondition(condition); }
public OJIfStatement(String condition, String thenPart) { super(); this.setThenPart(new OJBlock()); this.setCondition(condition); this.addToThenPart(thenPart); }
public OJIfStatement(String condition, String thenPart, String elsePart) { super(); this.setThenPart(new OJBlock()); this.setCondition(condition); this.addToThenPart(thenPart); this.addToElsePart(elsePart); }
/** Copies all attributes and associations of this instance into 'copy'. True parts, i.e. associations marked 'aggregate' or 'composite', and attributes, are copied as well. References to other objects, i.e. associations not marked 'aggregate' or 'composite', will not be copied. The 'copy' will refer to the same objects as the original (this) instance. * * @param copy */ public void copyInfoInto(OJIfStatement copy) { super.copyInfoInto(copy); copy.setCondition(getCondition()); if ( getThenPart() != null ) { copy.setThenPart(getThenPart()); } if ( getElsePart() != null ) { copy.setElsePart(getElsePart()); } }
public void copyDeepInfoInto(OJIfStatement copy) { super.copyDeepInfoInto(copy); copy.setCondition(getCondition()); if (getThenPart() != null) { copy.setThenPart(getThenPart().getDeepCopy()); } if (getElsePart() != null) { copy.setElsePart(getElsePart().getDeepCopy()); } }
if (countFrom == 1) { ifStatementFrom.setCondition(condition); ifStatementFrom.setThenPart(conditionBlockFrom); } else if (countFrom == concreteImplementationsFrom.size()) { ifStatementFrom.setElsePart(conditionBlockFrom);
if (countFrom == 1) { ifStatementFrom.setCondition(condition); ifStatementFrom.setThenPart(conditionBlockFrom); } else if (countFrom == concreteImplementationsFrom.size()) { ifStatementFrom.setElsePart(conditionBlockFrom);
isInverse.setThenPart(new OJBlock()); isInverse.setElsePart(new OJBlock()); isInverse.getThenPart().addToStatements("runtimeProperty = (" + UmlgClassOperations.propertyEnumName(clazz) + ".fromQualifiedName(tumlRuntimeProperty.getQualifiedName()))"); ifResultNull.setThenPart(new OJBlock()); getCollectionFor.getBody().addToStatements(ifResultNull); ifResultNull.getThenPart().addToLocals(runtimeProperty);
if (countFrom == 1) { ifStatementFrom.setCondition(condition); ifStatementFrom.setThenPart(conditionBlockFrom); } else if (countFrom == concreteImplementationsFrom.size()) { ifStatementFrom.setElsePart(conditionBlockFrom);