/** Clone a prototype template. * Copy all fields minus {@link #debugState}; don't delegate to {@link #ST()}, * which creates {@link ConstructionEvent}. */ public ST(ST proto) { try { // Because add() can fake a formal arg def, make sure to clone impl // entire impl so formalArguments list is cloned as well. Don't want // further derivations altering previous arg defs. See // testRedefOfKeyInCloneAfterAddingAttribute(). this.impl = proto.impl.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } if ( proto.locals!=null ) { this.locals = new Object[proto.locals.length]; System.arraycopy(proto.locals, 0, this.locals, 0, proto.locals.length); } else if (impl.formalArguments != null && !impl.formalArguments.isEmpty()) { this.locals = new Object[impl.formalArguments.size()]; Arrays.fill(this.locals, EMPTY_ATTR); } this.groupThatCreatedThisInstance = proto.groupThatCreatedThisInstance; }
/** Clone a prototype template. * Copy all fields minus {@link #debugState}; don't delegate to {@link #ST()}, * which creates {@link ConstructionEvent}. */ public ST(ST proto) { try { // Because add() can fake a formal arg def, make sure to clone impl // entire impl so formalArguments list is cloned as well. Don't want // further derivations altering previous arg defs. See // testRedefOfKeyInCloneAfterAddingAttribute(). this.impl = proto.impl.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } if ( proto.locals!=null ) { this.locals = new Object[proto.locals.length]; System.arraycopy(proto.locals, 0, this.locals, 0, proto.locals.length); } else if (impl.formalArguments != null && !impl.formalArguments.isEmpty()) { this.locals = new Object[impl.formalArguments.size()]; Arrays.fill(this.locals, EMPTY_ATTR); } this.groupThatCreatedThisInstance = proto.groupThatCreatedThisInstance; }
/** Clone a prototype template. * Copy all fields minus {@link #debugState}; don't delegate to {@link #ST()}, * which creates {@link ConstructionEvent}. */ public ST(ST proto) { try { // Because add() can fake a formal arg def, make sure to clone impl // entire impl so formalArguments list is cloned as well. Don't want // further derivations altering previous arg defs. See // testRedefOfKeyInCloneAfterAddingAttribute(). this.impl = proto.impl.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } if ( proto.locals!=null ) { this.locals = new Object[proto.locals.length]; System.arraycopy(proto.locals, 0, this.locals, 0, proto.locals.length); } else if (impl.formalArguments != null && !impl.formalArguments.isEmpty()) { this.locals = new Object[impl.formalArguments.size()]; Arrays.fill(this.locals, EMPTY_ATTR); } this.groupThatCreatedThisInstance = proto.groupThatCreatedThisInstance; }
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {
st.impl = st.impl.clone(); st.add(argument.getKey(), argument.getValue()); } catch (CloneNotSupportedException ex) {