|
|
@ -13,9 +13,8 @@ abstract class Transformer { |
|
|
|
|
|
|
|
|
|
|
|
var changed: Boolean |
|
|
|
var changed: Boolean |
|
|
|
do { |
|
|
|
do { |
|
|
|
changed = false |
|
|
|
changed = prePass(classPath) |
|
|
|
|
|
|
|
|
|
|
|
prePass(classPath) |
|
|
|
|
|
|
|
for (library in classPath.libraries) { |
|
|
|
for (library in classPath.libraries) { |
|
|
|
for (clazz in library) { |
|
|
|
for (clazz in library) { |
|
|
|
changed = changed or transformClass(classPath, library, clazz) |
|
|
|
changed = changed or transformClass(classPath, library, clazz) |
|
|
@ -35,7 +34,8 @@ abstract class Transformer { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
postPass(classPath) |
|
|
|
|
|
|
|
|
|
|
|
changed = changed or postPass(classPath) |
|
|
|
} while (changed) |
|
|
|
} while (changed) |
|
|
|
|
|
|
|
|
|
|
|
postTransform(classPath) |
|
|
|
postTransform(classPath) |
|
|
@ -45,8 +45,8 @@ abstract class Transformer { |
|
|
|
// empty |
|
|
|
// empty |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected open fun prePass(classPath: ClassPath) { |
|
|
|
protected open fun prePass(classPath: ClassPath): Boolean { |
|
|
|
// empty |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected open fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { |
|
|
|
protected open fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { |
|
|
@ -89,8 +89,8 @@ abstract class Transformer { |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected open fun postPass(classPath: ClassPath) { |
|
|
|
protected open fun postPass(classPath: ClassPath): Boolean { |
|
|
|
// empty |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected open fun postTransform(classPath: ClassPath) { |
|
|
|
protected open fun postTransform(classPath: ClassPath) { |
|
|
|