Package org.stianloader.micromixin.transform.internal.selectors

## Class StringSelector

- java.lang.Object
- - org.stianloader.micromixin.transform.internal.selectors.StringSelector

- All Implemented Interfaces:
    `InjectionPointConstraint`, `MixinTargetSelector`

      public class StringSelector
      extends java.lang.Object
      implements MixinTargetSelector, InjectionPointConstraint

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StringSelector​(java.lang.String text)` |
    `StringSelector​(java.lang.String owner, java.lang.String name, java.lang.String desc)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isValid​(org.objectweb.asm.tree.AbstractInsnNode insn, SimpleRemapper remapper, java.lang.StringBuilder sharedBuilder)` | Check whether the specified instruction is applicable to this constraint.
    `org.objectweb.asm.tree.MethodNode` | `selectMethod​(org.objectweb.asm.tree.ClassNode within, MixinStub source)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StringSelector

          public StringSelector​(@NotNull
                                java.lang.String text)

    - #### StringSelector

          public StringSelector​(@Nullable
                                java.lang.String owner,
                                @Nullable
                                java.lang.String name,
                                @Nullable
                                java.lang.String desc)

  - ### Method Detail

    - #### selectMethod

          @Nullable
          public org.objectweb.asm.tree.MethodNode selectMethod​(@NotNull
                                                                org.objectweb.asm.tree.ClassNode within,
                                                                @NotNull
                                                                MixinStub source)

      Specified by:
        `selectMethod` in interface `MixinTargetSelector`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### isValid

          public boolean isValid​(@NotNull
                                 org.objectweb.asm.tree.AbstractInsnNode insn,
                                 @NotNull
                                 SimpleRemapper remapper,
                                 @NotNull
                                 java.lang.StringBuilder sharedBuilder)

      Description copied from interface: `InjectionPointConstraint`
      Check whether the specified instruction is applicable to this constraint.
      Specified by:
        `isValid` in interface `InjectionPointConstraint`
      Parameters:
        `insn` - The instruction to check.
        `remapper` - The remapper instance to make use of. This is used to remap any references of the mixin class to the target class when applying injection point constraints.
        `sharedBuilder` - Shared `StringBuilder` instance to reduce `StringBuilder` allocations.
      Returns:
        True if valid, false otherwise