Class TargetSelectors
java.lang.Object
org.spongepowered.asm.mixin.injection.selectors.TargetSelectors
- All Implemented Interfaces:
Iterable<TargetSelectors.SelectedMethod>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSelected target method, paired with the selector which identified it -
Constructor Summary
ConstructorsConstructorDescriptionTargetSelectors(ISelectorContext context, org.objectweb.asm.tree.ClassNode classNode) -
Method Summary
Modifier and TypeMethodDescriptionaddSelector(ITargetSelector selector) voidclear()voidfind()Find methods in the target class which match the parsed selectorsprotected voidFor each root target, resolve the nested targets from the target descriptorbooleaniterator()voidparse(Set<ITargetSelector> selectors) voidremove(TargetSelectors.SelectedMethod target) setPermissivePass(boolean enabled) intsize()voidvalidate(int expectedCallbackCount, int requiredCallbackCount) Post-search validation that some targets were found, we can fail-fast if no targets were actually identified or if the specified limits are exceeded.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TargetSelectors
-
-
Method Details
-
parse
-
addSelector
-
size
public int size() -
clear
public void clear() -
iterator
- Specified by:
iteratorin interfaceIterable<TargetSelectors.SelectedMethod>
-
remove
-
isPermissivePassEnabled
public boolean isPermissivePassEnabled() -
setPermissivePass
-
find
public void find()Find methods in the target class which match the parsed selectors -
findNestedTargets
protected void findNestedTargets()For each root target, resolve the nested targets from the target descriptor -
validate
public void validate(int expectedCallbackCount, int requiredCallbackCount) Post-search validation that some targets were found, we can fail-fast if no targets were actually identified or if the specified limits are exceeded.- Parameters:
expectedCallbackCount- Number of callbacks specified by expectrequiredCallbackCount- Number of callbacks specified by require
-