Interface ITargetSelectorByName

All Superinterfaces:
ITargetSelector
All Known Subinterfaces:
ITargetSelectorConstructor, ITargetSelectorRemappable
All Known Implementing Classes:
MemberInfo

public interface ITargetSelectorByName
extends ITargetSelector
A target selector which selects elements directly by name.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDesc()
    Get the member descriptor, can be null
    java.lang.String getName()
    Get the member name, can be null
    java.lang.String getOwner()
    Get the member owner, can be null
    boolean isClassInitialiser()
    Get whether this selector represents a class initialiser
    boolean isConstructor()
    Get whether this member represents a constructor
    boolean isField()
    Get whether this target selector is definitely a field, the output of this method is undefined if isFullyQualified() returns false.
    boolean isFullyQualified()
    Get whether this reference is fully qualified
    boolean isInitialiser()
    Get whether this selector represents a constructor or class initialiser
    MatchResult matches​(java.lang.String owner, java.lang.String name, java.lang.String desc)
    Test whether this selector matches the supplied values.
    java.lang.String toDescriptor()
    Get a representation of this selector as a complete descriptor

    Methods inherited from interface org.spongepowered.asm.mixin.injection.selectors.ITargetSelector

    attach, configure, getMatchCount, match, match, next, validate
  • Method Details

    • getOwner

      java.lang.String getOwner()
      Get the member owner, can be null
    • getName

      java.lang.String getName()
      Get the member name, can be null
    • getDesc

      java.lang.String getDesc()
      Get the member descriptor, can be null
    • isFullyQualified

      boolean isFullyQualified()
      Get whether this reference is fully qualified
      Returns:
      true if all components of this reference are non-null
    • isField

      boolean isField()
      Get whether this target selector is definitely a field, the output of this method is undefined if isFullyQualified() returns false.
      Returns:
      true if this is definitely a field
    • isConstructor

      boolean isConstructor()
      Get whether this member represents a constructor
      Returns:
      true if member name is <init>
    • isClassInitialiser

      boolean isClassInitialiser()
      Get whether this selector represents a class initialiser
      Returns:
      true if member name is <clinit>
    • isInitialiser

      boolean isInitialiser()
      Get whether this selector represents a constructor or class initialiser
      Returns:
      true if member name is <init> or <clinit>
    • toDescriptor

      java.lang.String toDescriptor()
      Get a representation of this selector as a complete descriptor
    • matches

      MatchResult matches​(java.lang.String owner, java.lang.String name, java.lang.String desc)
      Test whether this selector matches the supplied values. Null values are ignored.
      Parameters:
      owner - Owner to compare with, null to skip
      name - Name to compare with, null to skip
      desc - Signature to compare with, null to skip
      Returns:
      true if all non-null values in this reference match non-null arguments supplied to this method