Skip to content

Commit

Permalink
ITransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamesuta committed Sep 26, 2019
1 parent 7f6eadc commit 805de62
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/cpw/mods/modlauncher/api/ITransformer.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
package cpw.mods.modlauncher.api;

import java.util.Set;

public interface ITransformer<T> {
String[] DEFAULT_LABEL = { "default" };

T transform(T input, ITransformerVotingContext context);

TransformerVoteResult castVote(ITransformerVotingContext context);

Set<Target> targets();

default String[] labels() {
return DEFAULT_LABEL;
}

enum TargetType {
CLASS,
METHOD,
FIELD
}

final class Target {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package cpw.mods.modlauncher.api;

public interface ITransformerVotingContext {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package cpw.mods.modlauncher.api;

public enum TransformerVoteResult {
YES,
DEFER,
NO,
REJECT
}

0 comments on commit 805de62

Please sign in to comment.