public class ComplexTypeConverterImpl extends TypeConverterImpl implements ComplexTypeConverter { /** * The cached value of the '{@link #getIn2out() <em>In2out</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getIn2out() * @generated * @ordered */ protected Mapping in2out; /** * The cached value of the '{@link #getOut2in() <em>Out2in</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOut2in() * @generated * @ordered */ protected Mapping out2in; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ComplexTypeConverterImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return MappingPackage.Literals.COMPLEX_TYPE_CONVERTER; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Mapping getIn2out() { if (in2out != null && in2out.eIsProxy()) { InternalEObject oldIn2out = (InternalEObject)in2out; in2out = (Mapping)eResolveProxy(oldIn2out); if (in2out != oldIn2out) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT, oldIn2out, in2out)); } } return in2out; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Mapping basicGetIn2out() { return in2out; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setIn2out(Mapping newIn2out) { Mapping oldIn2out = in2out; in2out = newIn2out; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT, oldIn2out, in2out)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Mapping getOut2in() { if (out2in != null && out2in.eIsProxy()) { InternalEObject oldOut2in = (InternalEObject)out2in; out2in = (Mapping)eResolveProxy(oldOut2in); if (out2in != oldOut2in) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN, oldOut2in, out2in)); } } return out2in; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Mapping basicGetOut2in() { return out2in; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOut2in(Mapping newOut2in) { Mapping oldOut2in = out2in; out2in = newOut2in; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN, oldOut2in, out2in)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT: if (resolve) return getIn2out(); return basicGetIn2out(); case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN: if (resolve) return getOut2in(); return basicGetOut2in(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT: setIn2out((Mapping)newValue); return; case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN: setOut2in((Mapping)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT: setIn2out((Mapping)null); return; case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN: setOut2in((Mapping)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT: return in2out != null; case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN: return out2in != null; } return super.eIsSet(featureID);
public class FunctionPairImpl extends TypeConverterImpl implements FunctionPair { /** * The cached value of the '{@link #getIn2out() <em>In2out</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getIn2out() * @generated * @ordered */ protected EOperation in2out; /** * The cached value of the '{@link #getOut2in() <em>Out2in</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOut2in() * @generated * @ordered */ protected EOperation out2in; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected FunctionPairImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return MappingPackage.Literals.FUNCTION_PAIR; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation getIn2out() { if (in2out != null && in2out.eIsProxy()) { InternalEObject oldIn2out = (InternalEObject)in2out; in2out = (EOperation)eResolveProxy(oldIn2out); if (in2out != oldIn2out) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.FUNCTION_PAIR__IN2OUT, oldIn2out, in2out)); } } return in2out; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation basicGetIn2out() { return in2out; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setIn2out(EOperation newIn2out) { EOperation oldIn2out = in2out; in2out = newIn2out; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.FUNCTION_PAIR__IN2OUT, oldIn2out, in2out)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation getOut2in() { if (out2in != null && out2in.eIsProxy()) { InternalEObject oldOut2in = (InternalEObject)out2in; out2in = (EOperation)eResolveProxy(oldOut2in); if (out2in != oldOut2in) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.FUNCTION_PAIR__OUT2IN, oldOut2in, out2in)); } } return out2in; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation basicGetOut2in() { return out2in; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOut2in(EOperation newOut2in) { EOperation oldOut2in = out2in; out2in = newOut2in; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.FUNCTION_PAIR__OUT2IN, oldOut2in, out2in)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case MappingPackage.FUNCTION_PAIR__IN2OUT: if (resolve) return getIn2out(); return basicGetIn2out(); case MappingPackage.FUNCTION_PAIR__OUT2IN: if (resolve) return getOut2in(); return basicGetOut2in(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case MappingPackage.FUNCTION_PAIR__IN2OUT: setIn2out((EOperation)newValue); return; case MappingPackage.FUNCTION_PAIR__OUT2IN: setOut2in((EOperation)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case MappingPackage.FUNCTION_PAIR__IN2OUT: setIn2out((EOperation)null); return; case MappingPackage.FUNCTION_PAIR__OUT2IN: setOut2in((EOperation)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case MappingPackage.FUNCTION_PAIR__IN2OUT: return in2out != null; case MappingPackage.FUNCTION_PAIR__OUT2IN: return out2in != null; } return super.eIsSet(featureID);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/ComplexTypeConverterImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/FunctionPairImpl.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class ComplexTypeConverterImpl extends TypeConverterImpl implements ComplexTypeConverter
1
public class FunctionPairImpl extends TypeConverterImpl implements FunctionPair
2
{
2
{
3
  /**
3
  /**
4
   * The cached value of the '{@link #getIn2out() <em>In2out</em>}' reference.
4
   * The cached value of the '{@link #getIn2out() <em>In2out</em>}' reference.
5
   * <!-- begin-user-doc -->
5
   * <!-- begin-user-doc -->
6
   * <!-- end-user-doc -->
6
   * <!-- end-user-doc -->
7
   * @see #getIn2out()
7
   * @see #getIn2out()
8
   * @generated
8
   * @generated
9
   * @ordered
9
   * @ordered
10
   */
10
   */
11
  protected Mapping in2out;
11
  protected EOperation in2out;
12
  /**
12
  /**
13
   * The cached value of the '{@link #getOut2in() <em>Out2in</em>}' reference.
13
   * The cached value of the '{@link #getOut2in() <em>Out2in</em>}' reference.
14
   * <!-- begin-user-doc -->
14
   * <!-- begin-user-doc -->
15
   * <!-- end-user-doc -->
15
   * <!-- end-user-doc -->
16
   * @see #getOut2in()
16
   * @see #getOut2in()
17
   * @generated
17
   * @generated
18
   * @ordered
18
   * @ordered
19
   */
19
   */
20
  protected Mapping out2in;
20
  protected EOperation out2in;
21
  /**
21
  /**
22
   * <!-- begin-user-doc -->
22
   * <!-- begin-user-doc -->
23
   * <!-- end-user-doc -->
23
   * <!-- end-user-doc -->
24
   * @generated
24
   * @generated
25
   */
25
   */
26
  protected ComplexTypeConverterImpl()
26
  protected FunctionPairImpl()
27
  {
27
  {
28
    super();
28
    super();
29
  }
29
  }
30
  /**
30
  /**
31
   * <!-- begin-user-doc -->
31
   * <!-- begin-user-doc -->
32
   * <!-- end-user-doc -->
32
   * <!-- end-user-doc -->
33
   * @generated
33
   * @generated
34
   */
34
   */
35
  @Override
35
  @Override
36
  protected EClass eStaticClass()
36
  protected EClass eStaticClass()
37
  {
37
  {
38
    return MappingPackage.Literals.COMPLEX_TYPE_CONVERTER;
38
    return MappingPackage.Literals.FUNCTION_PAIR;
39
  }
39
  }
40
  /**
40
  /**
41
   * <!-- begin-user-doc -->
41
   * <!-- begin-user-doc -->
42
   * <!-- end-user-doc -->
42
   * <!-- end-user-doc -->
43
   * @generated
43
   * @generated
44
   */
44
   */
45
  public Mapping getIn2out()
45
  public EOperation getIn2out()
46
  {
46
  {
47
    if (in2out != null && in2out.eIsProxy())
47
    if (in2out != null && in2out.eIsProxy())
48
    {
48
    {
49
      InternalEObject oldIn2out = (InternalEObject)in2out;
49
      InternalEObject oldIn2out = (InternalEObject)in2out;
50
      in2out = (Mapping)eResolveProxy(oldIn2out);
50
      in2out = (EOperation)eResolveProxy(oldIn2out);
51
      if (in2out != oldIn2out)
51
      if (in2out != oldIn2out)
52
      {
52
      {
53
        if (eNotificationRequired())
53
        if (eNotificationRequired())
54
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT, oldIn2out, in2out));
54
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.FUNCTION_PAIR__IN2OUT, oldIn2out, in2out));
55
      }
55
      }
56
    }
56
    }
57
    return in2out;
57
    return in2out;
58
  }
58
  }
59
  /**
59
  /**
60
   * <!-- begin-user-doc -->
60
   * <!-- begin-user-doc -->
61
   * <!-- end-user-doc -->
61
   * <!-- end-user-doc -->
62
   * @generated
62
   * @generated
63
   */
63
   */
64
  public Mapping basicGetIn2out()
64
  public EOperation basicGetIn2out()
65
  {
65
  {
66
    return in2out;
66
    return in2out;
67
  }
67
  }
68
  /**
68
  /**
69
   * <!-- begin-user-doc -->
69
   * <!-- begin-user-doc -->
70
   * <!-- end-user-doc -->
70
   * <!-- end-user-doc -->
71
   * @generated
71
   * @generated
72
   */
72
   */
73
  public void setIn2out(Mapping newIn2out)
73
  public void setIn2out(EOperation newIn2out)
74
  {
74
  {
75
    Mapping oldIn2out = in2out;
75
    EOperation oldIn2out = in2out;
76
    in2out = newIn2out;
76
    in2out = newIn2out;
77
    if (eNotificationRequired())
77
    if (eNotificationRequired())
78
      eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT, oldIn2out, in2out));
78
      eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.FUNCTION_PAIR__IN2OUT, oldIn2out, in2out));
79
  }
79
  }
80
  /**
80
  /**
81
   * <!-- begin-user-doc -->
81
   * <!-- begin-user-doc -->
82
   * <!-- end-user-doc -->
82
   * <!-- end-user-doc -->
83
   * @generated
83
   * @generated
84
   */
84
   */
85
  public Mapping getOut2in()
85
  public EOperation getOut2in()
86
  {
86
  {
87
    if (out2in != null && out2in.eIsProxy())
87
    if (out2in != null && out2in.eIsProxy())
88
    {
88
    {
89
      InternalEObject oldOut2in = (InternalEObject)out2in;
89
      InternalEObject oldOut2in = (InternalEObject)out2in;
90
      out2in = (Mapping)eResolveProxy(oldOut2in);
90
      out2in = (EOperation)eResolveProxy(oldOut2in);
91
      if (out2in != oldOut2in)
91
      if (out2in != oldOut2in)
92
      {
92
      {
93
        if (eNotificationRequired())
93
        if (eNotificationRequired())
94
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN, oldOut2in, out2in));
94
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.FUNCTION_PAIR__OUT2IN, oldOut2in, out2in));
95
      }
95
      }
96
    }
96
    }
97
    return out2in;
97
    return out2in;
98
  }
98
  }
99
  /**
99
  /**
100
   * <!-- begin-user-doc -->
100
   * <!-- begin-user-doc -->
101
   * <!-- end-user-doc -->
101
   * <!-- end-user-doc -->
102
   * @generated
102
   * @generated
103
   */
103
   */
104
  public Mapping basicGetOut2in()
104
  public EOperation basicGetOut2in()
105
  {
105
  {
106
    return out2in;
106
    return out2in;
107
  }
107
  }
108
  /**
108
  /**
109
   * <!-- begin-user-doc -->
109
   * <!-- begin-user-doc -->
110
   * <!-- end-user-doc -->
110
   * <!-- end-user-doc -->
111
   * @generated
111
   * @generated
112
   */
112
   */
113
  public void setOut2in(Mapping newOut2in)
113
  public void setOut2in(EOperation newOut2in)
114
  {
114
  {
115
    Mapping oldOut2in = out2in;
115
    EOperation oldOut2in = out2in;
116
    out2in = newOut2in;
116
    out2in = newOut2in;
117
    if (eNotificationRequired())
117
    if (eNotificationRequired())
118
      eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN, oldOut2in, out2in));
118
      eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.FUNCTION_PAIR__OUT2IN, oldOut2in, out2in));
119
  }
119
  }
120
  /**
120
  /**
121
   * <!-- begin-user-doc -->
121
   * <!-- begin-user-doc -->
122
   * <!-- end-user-doc -->
122
   * <!-- end-user-doc -->
123
   * @generated
123
   * @generated
124
   */
124
   */
125
  @Override
125
  @Override
126
  public Object eGet(int featureID, boolean resolve, boolean coreType)
126
  public Object eGet(int featureID, boolean resolve, boolean coreType)
127
  {
127
  {
128
    switch (featureID)
128
    switch (featureID)
129
    {
129
    {
130
      case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT:
130
      case MappingPackage.FUNCTION_PAIR__IN2OUT:
131
        if (resolve) return getIn2out();
131
        if (resolve) return getIn2out();
132
        return basicGetIn2out();
132
        return basicGetIn2out();
133
      case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN:
133
      case MappingPackage.FUNCTION_PAIR__OUT2IN:
134
        if (resolve) return getOut2in();
134
        if (resolve) return getOut2in();
135
        return basicGetOut2in();
135
        return basicGetOut2in();
136
    }
136
    }
137
    return super.eGet(featureID, resolve, coreType);
137
    return super.eGet(featureID, resolve, coreType);
138
  }
138
  }
139
  /**
139
  /**
140
   * <!-- begin-user-doc -->
140
   * <!-- begin-user-doc -->
141
   * <!-- end-user-doc -->
141
   * <!-- end-user-doc -->
142
   * @generated
142
   * @generated
143
   */
143
   */
144
  @Override
144
  @Override
145
  public void eSet(int featureID, Object newValue)
145
  public void eSet(int featureID, Object newValue)
146
  {
146
  {
147
    switch (featureID)
147
    switch (featureID)
148
    {
148
    {
149
      case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT:
149
      case MappingPackage.FUNCTION_PAIR__IN2OUT:
150
        setIn2out((Mapping)newValue);
150
        setIn2out((EOperation)newValue);
151
        return;
151
        return;
152
      case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN:
152
      case MappingPackage.FUNCTION_PAIR__OUT2IN:
153
        setOut2in((Mapping)newValue);
153
        setOut2in((EOperation)newValue);
154
        return;
154
        return;
155
    }
155
    }
156
    super.eSet(featureID, newValue);
156
    super.eSet(featureID, newValue);
157
  }
157
  }
158
  /**
158
  /**
159
   * <!-- begin-user-doc -->
159
   * <!-- begin-user-doc -->
160
   * <!-- end-user-doc -->
160
   * <!-- end-user-doc -->
161
   * @generated
161
   * @generated
162
   */
162
   */
163
  @Override
163
  @Override
164
  public void eUnset(int featureID)
164
  public void eUnset(int featureID)
165
  {
165
  {
166
    switch (featureID)
166
    switch (featureID)
167
    {
167
    {
168
      case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT:
168
      case MappingPackage.FUNCTION_PAIR__IN2OUT:
169
        setIn2out((Mapping)null);
169
        setIn2out((EOperation)null);
170
        return;
170
        return;
171
      case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN:
171
      case MappingPackage.FUNCTION_PAIR__OUT2IN:
172
        setOut2in((Mapping)null);
172
        setOut2in((EOperation)null);
173
        return;
173
        return;
174
    }
174
    }
175
    super.eUnset(featureID);
175
    super.eUnset(featureID);
176
  }
176
  }
177
  /**
177
  /**
178
   * <!-- begin-user-doc -->
178
   * <!-- begin-user-doc -->
179
   * <!-- end-user-doc -->
179
   * <!-- end-user-doc -->
180
   * @generated
180
   * @generated
181
   */
181
   */
182
  @Override
182
  @Override
183
  public boolean eIsSet(int featureID)
183
  public boolean eIsSet(int featureID)
184
  {
184
  {
185
    switch (featureID)
185
    switch (featureID)
186
    {
186
    {
187
      case MappingPackage.COMPLEX_TYPE_CONVERTER__IN2OUT:
187
      case MappingPackage.FUNCTION_PAIR__IN2OUT:
188
        return in2out != null;
188
        return in2out != null;
189
      case MappingPackage.COMPLEX_TYPE_CONVERTER__OUT2IN:
189
      case MappingPackage.FUNCTION_PAIR__OUT2IN:
190
        return out2in != null;
190
        return out2in != null;
191
    }
191
    }
192
    return super.eIsSet(featureID);
192
    return super.eIsSet(featureID);
193
  
193
  
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0