Lines Matching refs:oldInstance

120      * the class of <code>oldInstance</code> explicitly declares an "equals" method
121 * this method returns the value of <code>oldInstance.equals(newInstance)</code>.
125 * @param oldInstance The instance to be copied.
128 * created by applying a series of mutations to <code>oldInstance</code>.
132 protected boolean mutatesTo(Object oldInstance, Object newInstance) {
135 return (constructor.length == 0) || !definesEquals(oldInstance) ?
136 super.mutatesTo(oldInstance, newInstance) :
137 oldInstance.equals(newInstance);
146 * @param oldInstance The instance to be instantiated.
148 * @return An expression whose value is <code>oldInstance</code>.
154 protected Expression instantiate(Object oldInstance, Encoder out) {
156 Class type = oldInstance.getClass();
161 constructorArgs[i] = MethodUtil.invoke(method, oldInstance, new Object[0]);
167 return new Expression(oldInstance, oldInstance.getClass(), "new", constructorArgs);
185 private void doProperty(Class type, PropertyDescriptor pd, Object oldInstance, Object newInstance, Encoder out) throws Exception {
190 Expression oldGetExp = new Expression(oldInstance, getter.getName(), new Object[]{});
211 invokeStatement(oldInstance, setter.getName(), new Object[]{oldValue}, out);
221 private void initBean(Class type, Object oldInstance, Object newInstance, Encoder out) {
228 Expression oldGetExp = new Expression(field, "get", new Object[] { oldInstance });
234 out.writeStatement(new Statement(field, "set", new Object[] { oldInstance, oldValue }));
253 doProperty(type, d, oldInstance, newInstance, out);
316 oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{});
322 oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{listenerType});
335 invokeStatement(oldInstance, addListenerMethodName, new Object[]{oldL[i]}, out);
340 invokeStatement(oldInstance, removeListenerMethodName, new Object[]{newL[i]}, out);
358 * to the <code>oldInstance</code>. The value of this
384 * @param oldInstance The instance to be copied.
394 Object oldInstance, Object newInstance,
398 super.initialize(type, oldInstance, newInstance, out);
399 if (oldInstance.getClass() == type) { // !type.isInterface()) {
400 initBean(type, oldInstance, newInstance, out);