Class TargetSelectors
- java.lang.Object
-
- org.spongepowered.asm.mixin.injection.selectors.TargetSelectors
-
- All Implemented Interfaces:
java.lang.Iterable<TargetSelectors.SelectedMethod>
public class TargetSelectors extends java.lang.Object implements java.lang.Iterable<TargetSelectors.SelectedMethod>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTargetSelectors.SelectedMethodSelected target method, paired with the selector which identified it
-
Constructor Summary
Constructors Constructor Description TargetSelectors(ISelectorContext context, org.objectweb.asm.tree.ClassNode classNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TargetSelectorsaddSelector(ITargetSelector selector)voidclear()voidfind()Find methods in the target class which match the parsed selectorsprotected voidfindNestedTargets()For each root target, resolve the nested targets from the target descriptorbooleanisPermissivePassEnabled()java.util.Iterator<TargetSelectors.SelectedMethod>iterator()voidparse(java.util.Set<ITargetSelector> selectors)voidremove(TargetSelectors.SelectedMethod target)TargetSelectorssetPermissivePass(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.
-
-
-
Constructor Detail
-
TargetSelectors
public TargetSelectors(ISelectorContext context, org.objectweb.asm.tree.ClassNode classNode)
-
-
Method Detail
-
parse
public void parse(java.util.Set<ITargetSelector> selectors)
-
addSelector
public TargetSelectors addSelector(ITargetSelector selector)
-
size
public int size()
-
clear
public void clear()
-
iterator
public java.util.Iterator<TargetSelectors.SelectedMethod> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<TargetSelectors.SelectedMethod>
-
remove
public void remove(TargetSelectors.SelectedMethod target)
-
isPermissivePassEnabled
public boolean isPermissivePassEnabled()
-
setPermissivePass
public TargetSelectors setPermissivePass(boolean enabled)
-
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
-
-