public class InvalidSelector extends java.lang.Object implements ITargetSelector
TargetSelector.parse(java.lang.Iterable<?>, org.spongepowered.asm.mixin.injection.selectors.ISelectorContext) prohibits returing
null, instances of this selector are returned when supplied arguments
are unparseable in order to throw exceptions only during validation.ITargetSelector.Configure| Constructor and Description |
|---|
InvalidSelector(java.lang.String input) |
InvalidSelector(java.lang.Throwable cause) |
InvalidSelector(java.lang.Throwable cause,
java.lang.String input) |
| Modifier and Type | Method and Description |
|---|---|
ITargetSelector |
attach(ISelectorContext context)
Attach this selector to the specified context.
|
ITargetSelector |
configure(ITargetSelector.Configure request,
java.lang.String... args)
Configure and return a modified version of this selector by consuming the
supplied arguments.
|
int |
getMaxMatchCount()
Maximum number of candidates this selector can match
|
int |
getMinMatchCount()
Minimum number of candidates this selector must match
|
<TNode> MatchResult |
match(ElementNode<TNode> node)
Test whether this selector matches the supplied element node
|
ITargetSelector |
next()
Get the next target selector in this path (or null if this
selector is the last selector in the chain.
|
java.lang.String |
toString() |
ITargetSelector |
validate()
Perform basic sanity-check validation of the selector, checks that the
parsed out parameters are basically sane
|
public InvalidSelector(java.lang.Throwable cause)
public InvalidSelector(java.lang.String input)
public InvalidSelector(java.lang.Throwable cause,
java.lang.String input)
public java.lang.String toString()
toString in class java.lang.Objectpublic ITargetSelector next()
ITargetSelectorCan return null
next in interface ITargetSelectorpublic ITargetSelector configure(ITargetSelector.Configure request, java.lang.String... args)
ITargetSelectorIn other words, calling configure(Configure.ORPHAN) when this object is already an orphan or does not support orphaning, may simply return this object, or might return an identically-configured copy.
Must not return null, defaults to returning unmodified selector.
configure in interface ITargetSelectorrequest - Requested operationargs - Configuration argumentspublic ITargetSelector validate() throws InvalidSelectorException
ITargetSelectorvalidate in interface ITargetSelectorInvalidSelectorException - if any sanity check failspublic ITargetSelector attach(ISelectorContext context) throws InvalidSelectorException
ITargetSelectorInvalidSelectorException is thrown.attach in interface ITargetSelectorcontext - Context to attach toInvalidSelectorExceptionpublic int getMinMatchCount()
ITargetSelectorgetMinMatchCount in interface ITargetSelectorpublic int getMaxMatchCount()
ITargetSelectorgetMaxMatchCount in interface ITargetSelectorpublic <TNode> MatchResult match(ElementNode<TNode> node)
ITargetSelectormatch in interface ITargetSelectorTNode - node typenode - node node to test