|
|
@ -308,21 +308,20 @@ public class ClassAnalyzer |
|
|
|
// First analyze constructors and synthetic fields:
|
|
|
|
// First analyze constructors and synthetic fields:
|
|
|
|
constrAna = null; |
|
|
|
constrAna = null; |
|
|
|
if (constructors.length > 0) { |
|
|
|
if (constructors.length > 0) { |
|
|
|
for (int j=0; j< constructors.length; j++) |
|
|
|
for (int j=0; j< constructors.length; j++) { |
|
|
|
{ |
|
|
|
if (pl != null) { |
|
|
|
if (pl != null) { |
|
|
|
double constrCompl = constructors[j].getComplexity() |
|
|
|
double constrCompl = constructors[j].getComplexity() |
|
|
|
* subScale; |
|
|
|
* subScale; |
|
|
|
if (constrCompl > STEP_COMPLEXITY) |
|
|
|
if (constrCompl > STEP_COMPLEXITY) |
|
|
|
constructors[j].analyze(pl, done, constrCompl); |
|
|
|
constructors[j].analyze(pl, done, constrCompl); |
|
|
|
else { |
|
|
|
else { |
|
|
|
pl.updateProgress(done, name); |
|
|
|
pl.updateProgress(done, name); |
|
|
|
|
|
|
|
constructors[j].analyze(null, 0.0, 0.0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
done += constrCompl; |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
constructors[j].analyze(null, 0.0, 0.0); |
|
|
|
constructors[j].analyze(null, 0.0, 0.0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
done += constrCompl; |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
constructors[j].analyze(null, 0.0, 0.0); |
|
|
|
|
|
|
|
} |
|
|
|
constrAna = new TransformConstructors(this, false, constructors); |
|
|
|
constrAna = new TransformConstructors(this, false, constructors); |
|
|
|
constrAna.removeSynthInitializers(); |
|
|
|
constrAna.removeSynthInitializers(); |
|
|
|
} |
|
|
|
} |
|
|
@ -408,6 +407,7 @@ public class ClassAnalyzer |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void makeDeclaration(Set done) { |
|
|
|
public void makeDeclaration(Set done) { |
|
|
|
|
|
|
|
// First prepare constructors:
|
|
|
|
if (constrAna != null) |
|
|
|
if (constrAna != null) |
|
|
|
constrAna.transform(); |
|
|
|
constrAna.transform(); |
|
|
|
if (staticConstructor != null) { |
|
|
|
if (staticConstructor != null) { |
|
|
|