MergeSmali for Patch Developers

You must import a declaration file for the Annotations:
package whatever_package_you_like; public class MergeSmali { /* Use to mark classes as modifying an existing class */ public @interface Modify { String value() default ""; } /* Use to mark classes, methods or fields as require to be present */ public @interface Require { String value() default ""; } /* Use to mark new classes, methods or fields to replace existing */ public @interface Replace { String value() default ""; } /* Use to mark new classes, methods or fields to be inserted */ public @interface Insert { String value() default ""; } /* Use to mark existing classes, methods or fields to be deleted as unused */ public @interface Delete { String value() default ""; } /* Use to mark dummy constructors as not relevant */ public @interface Ignore { String value() default ""; } }
Here is an example of how you would markup your source Java for the patch:
import whatever_package_you_like.MergeSmali.*; @Modify public class Heatsink { @Require public static final double IDLE = 1e6; @Ignore public Heatsink() {} @Replace double getPowerLoss(int time) { return(IDLE); } }