Package cpw.mods.modlauncher.api
Interface ITransformerVotingContext
- All Known Implementing Classes:
VotingContext
public interface ITransformerVotingContext
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applyClassPredicate
(ITransformerVotingContext.ClassPredicate classPredicate) Return the result of applying the supplied class predicate to the current class node.boolean
applyFieldPredicate
(ITransformerVotingContext.FieldPredicate fieldPredicate) Return the result of applying the supplied field predicate to the current field node.boolean
applyInstructionPredicate
(ITransformerVotingContext.InsnPredicate insnPredicate) Return the result of applying the supplied instruction predicate to the current method node.boolean
applyMethodPredicate
(ITransformerVotingContext.MethodPredicate methodPredicate) Return the result of applying the supplied method predicate to the current method node.boolean
byte[]
-
Method Details
-
getClassName
String getClassName()- Returns:
- The class name being transformed
-
doesClassExist
boolean doesClassExist()- Returns:
- If the class already existed
-
getInitialClassSha256
byte[] getInitialClassSha256()- Returns:
- The initial sha256 checksum of the class bytes.
-
getAuditActivities
List<ITransformerActivity> getAuditActivities()- Returns:
- The activities already performed on this class. This list is read only, but will change as activities happen.
-
getReason
String getReason() -
applyFieldPredicate
Return the result of applying the supplied field predicate to the current field node. Can only be used on a Field target.- Parameters:
fieldPredicate
- The field predicate- Returns:
- true if the predicate passed
-
applyMethodPredicate
Return the result of applying the supplied method predicate to the current method node. Can only be used on a Method target.- Parameters:
methodPredicate
- The method predicate- Returns:
- true if the predicate passed
-
applyClassPredicate
Return the result of applying the supplied class predicate to the current class node. Can only be used on a Class target.- Parameters:
classPredicate
- The class predicate- Returns:
- true if the predicate passed
-
applyInstructionPredicate
Return the result of applying the supplied instruction predicate to the current method node. Can only be used on a Method target.- Parameters:
insnPredicate
- The insn predicate- Returns:
- true if the predicate passed
-