/** 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(OJSimpleStatement copy) { super.copyInfoInto(copy); copy.setExpression(getExpression()); }
/** 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(OJBlock copy) { super.copyInfoInto(copy); Iterator statementsIt = new ArrayList<OJStatement>(getStatements()).iterator(); while ( statementsIt.hasNext() ) { OJStatement elem = (OJStatement) statementsIt.next(); copy.addToStatements(elem); } Iterator localsIt = new ArrayList<OJField>(getLocals()).iterator(); while ( localsIt.hasNext() ) { OJField elem = (OJField) localsIt.next(); copy.addToLocals(elem); } }
/** 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(OJSwitchStatement copy) { super.copyInfoInto(copy); copy.setCondition(getCondition()); Iterator casesIt = new ArrayList<OJSwitchCase>(getCases()).iterator(); while ( casesIt.hasNext() ) { OJSwitchCase elem = (OJSwitchCase) casesIt.next(); copy.addToCases(elem); } if ( getDefCase() != null ) { copy.setDefCase(getDefCase()); } }
/** 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(OJWhileStatement copy) { super.copyInfoInto(copy); copy.setCondition(getCondition()); if ( getBody() != null ) { copy.setBody(getBody()); } }
/** 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()); } }
/** 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(OJTryStatement copy) { super.copyInfoInto(copy); if ( getTryPart() != null ) { copy.setTryPart(getTryPart()); } if ( getCatchPart() != null ) { copy.setCatchPart(getCatchPart()); } if ( getCatchParam() != null ) { copy.setCatchParam(getCatchParam()); } }
/** 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(OJForStatement copy) { super.copyInfoInto(copy); copy.setElemName(getElemName()); copy.setCollection(getCollection()); if ( getElemType() != null ) { copy.setElemType(getElemType()); } if ( getBody() != null ) { copy.setBody(getBody()); } }