File tree Expand file tree Collapse file tree
src/main/java/jce/codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,15 +103,14 @@ final class WrapperGenerator {
103103 * Checks whether the EPackage is empty or not. An empty ePackage has no classifiers and only empty subpackages.
104104 */
105105 def private static boolean isEmpty (EPackage ePackage ) {
106- if (! ePackage. EClassifiers . empty) {
107- return false // has classifier.
108- } else {
109- var empty = true
110- for (EPackage eSubpackage : ePackage. ESubpackages ) { // for every subpackage
111- empty = empty && isEmpty(eSubpackage) // check if empty
112- }
113- return empty
106+ var empty = true ;
107+ for (EClassifier eClassifier : ePackage. EClassifiers ) { // for every classifier
108+ empty = empty && ! (eClassifier instanceof EClass ) // check if is EClass
109+ }
110+ for (EPackage eSubpackage : ePackage. ESubpackages ) { // for every subpackage
111+ empty = empty && isEmpty(eSubpackage) // check if empty
114112 }
113+ return empty
115114 }
116115
117116 /**
@@ -136,4 +135,4 @@ final class WrapperGenerator {
136135 }
137136 }
138137 ' ' '
139- }
138+ }
You can’t perform that action at this time.
0 commit comments