Class AccessorName

java.lang.Object
org.cadixdev.mercury.mixin.annotation.AccessorName

public final class AccessorName extends Object
Accessor Name struct.
Since:
0.1.0
  • Method Details

    • of

      public static AccessorName of(String methodName)
      Get an accessor name from the supplied string. If the string matches the accessor name regex, split the string into the relevant parts
      Parameters:
      methodName - Name of the accessor method
      Returns:
      Parsed AccessorName struct or null if the name is not a valid accessor name
    • of

      public static AccessorName of(String methodName, boolean toMemberCase)
      Get an accessor name from the supplied string. If the string matches the accessor name regex, split the string into the relevant parts
      Parameters:
      methodName - Name of the accessor method
      toMemberCase - True if the first character of the name should be conditionally converted to lowercase. If the name is all uppercase (eg. if the NAME_IS_A_CONSTANT) the first character will not be lowercased, regardless of the state of this argument
      Returns:
      Parsed AccessorName struct or null if the name is not a valid accessor name
    • getMethodName

      public String getMethodName()
    • getPrefix

      public String getPrefix()
    • getName

      public String getName()
    • prefix

      public String prefix(String name)