-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(multi-os-engine/multi-os-engine#162) Only write modified classes
- Loading branch information
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/org/moe/tools/classvalidator/ClassModifier.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.moe.tools.classvalidator | ||
|
||
import org.objectweb.asm.ClassVisitor | ||
|
||
/** | ||
* A [ClassVisitor] that could modify a class | ||
*/ | ||
abstract class ClassModifier(api: Int, classVisitor: ClassVisitor?) : ClassVisitor(api, classVisitor) { | ||
|
||
var modified: Boolean = false | ||
private set | ||
|
||
fun markAsModified() { | ||
modified = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters