Lines 72-81
Link Here
|
72 |
abstractMethod.thrownExceptions, |
72 |
abstractMethod.thrownExceptions, |
73 |
this); |
73 |
this); |
74 |
|
74 |
|
75 |
MethodBinding[] temp = new MethodBinding[this.methods.length + 1]; |
75 |
final int length = this.methods.length; |
76 |
System.arraycopy(this.methods, 0, temp, 0, this.methods.length); |
76 |
System.arraycopy(this.methods, 0, this.methods = new MethodBinding[length + 1], 0, length); |
77 |
temp[this.methods.length] = defaultAbstract; |
77 |
this.methods[length] = defaultAbstract; |
78 |
this.methods = temp; |
78 |
ReferenceBinding.sortMethods(this.methods, 0, length); |
|
|
79 |
this.tagBits |= TagBits.AreMethodsSorted; |
79 |
} |
80 |
} |
80 |
public void addDefaultAbstractMethods() { |
81 |
public void addDefaultAbstractMethods() { |
81 |
if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return; |
82 |
if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return; |
Lines 88-94
Link Here
|
88 |
ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][]; |
89 |
ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][]; |
89 |
int lastPosition = 0; |
90 |
int lastPosition = 0; |
90 |
interfacesToVisit[lastPosition] = superInterfaces(); |
91 |
interfacesToVisit[lastPosition] = superInterfaces(); |
91 |
boolean hasAddedMethods = false; |
|
|
92 |
for (int i = 0; i <= lastPosition; i++) { |
92 |
for (int i = 0; i <= lastPosition; i++) { |
93 |
ReferenceBinding[] interfaces = interfacesToVisit[i]; |
93 |
ReferenceBinding[] interfaces = interfacesToVisit[i]; |
94 |
for (int j = 0, length = interfaces.length; j < length; j++) { |
94 |
for (int j = 0, length = interfaces.length; j < length; j++) { |
Lines 99-105
Link Here
|
99 |
MethodBinding method = superMethods[m]; |
99 |
MethodBinding method = superMethods[m]; |
100 |
if (!implementsMethod(method)) { |
100 |
if (!implementsMethod(method)) { |
101 |
addDefaultAbstractMethod(method); |
101 |
addDefaultAbstractMethod(method); |
102 |
hasAddedMethods = true; |
|
|
103 |
} |
102 |
} |
104 |
} |
103 |
} |
105 |
|
104 |
|
Lines 112-124
Link Here
|
112 |
} |
111 |
} |
113 |
} |
112 |
} |
114 |
} |
113 |
} |
115 |
if (hasAddedMethods) { |
|
|
116 |
// re-sort methods |
117 |
int length = this.methods.length; |
118 |
if (length > 1) { |
119 |
ReferenceBinding.sortMethods(this.methods, 0, length - 1); |
120 |
} |
121 |
} |
122 |
} |
114 |
} |
123 |
} |
115 |
} |
124 |
/* Add a new synthetic field for <actualOuterLocalVariable>. |
116 |
/* Add a new synthetic field for <actualOuterLocalVariable>. |