-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve mixin extraction with generated injectors
- Loading branch information
Showing
28 changed files
with
490 additions
and
211 deletions.
There are no files selected for viewing
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
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
41 changes: 41 additions & 0 deletions
41
definition/src/main/java/org/sinytra/adapter/patch/api/MethodTransformBuilder.java
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,41 @@ | ||
package org.sinytra.adapter.patch.api; | ||
|
||
import org.jetbrains.annotations.ApiStatus; | ||
import org.sinytra.adapter.patch.transformer.ModifyInjectionTarget; | ||
import org.sinytra.adapter.patch.transformer.ModifyMethodAccess; | ||
import org.sinytra.adapter.patch.transformer.ModifyMethodParams; | ||
import org.sinytra.adapter.patch.transformer.ModifyMixinType; | ||
import org.sinytra.adapter.patch.transformer.param.TransformParameters; | ||
|
||
import java.util.List; | ||
import java.util.function.Consumer; | ||
|
||
public interface MethodTransformBuilder<T extends MethodTransformBuilder<T>> { | ||
@Deprecated | ||
T modifyParams(Consumer<ModifyMethodParams.Builder> consumer); | ||
|
||
@ApiStatus.Experimental | ||
T transformParams(Consumer<TransformParameters.Builder> consumer); | ||
|
||
T modifyTarget(String... methods); | ||
|
||
T modifyTarget(ModifyInjectionTarget.Action action, String... methods); | ||
|
||
T modifyVariableIndex(int start, int offset); | ||
|
||
T modifyMethodAccess(ModifyMethodAccess.AccessChange... changes); | ||
|
||
T extractMixin(String targetClass); | ||
|
||
T splitMixin(String targetClass); | ||
|
||
T improveModifyVar(); | ||
|
||
T modifyMixinType(String newType, Consumer<ModifyMixinType.Builder> consumer); | ||
|
||
T transform(MethodTransform transformer); | ||
|
||
T transformMethods(List<MethodTransform> transformers); | ||
|
||
T chain(Consumer<T> consumer); | ||
} |
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
Oops, something went wrong.