Record Class JsStringFallbacks.DeclaredMethod

java.lang.Object
java.lang.Record
com.vaadin.flow.internal.JsStringFallbacks.DeclaredMethod
Record Components:
definitionType - the fallback interface
method - the method, declared or inherited by the interface
Enclosing class:
JsStringFallbacks

public static record JsStringFallbacks.DeclaredMethod(Class<?> definitionType, Method method) extends Record
A method that stands in for strings, with the JsStringFallback interface it is called through. That is not the class declaring the method when the interface inherits it, and only a call through the interface runs the function the bundle has for the string.
  • Constructor Details

    • DeclaredMethod

      public DeclaredMethod(Class<?> definitionType, Method method)
      Creates an instance of a DeclaredMethod record class.
      Parameters:
      definitionType - the value for the definitionType record component
      method - the value for the method record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • definitionType

      public Class<?> definitionType()
      Returns the value of the definitionType record component.
      Returns:
      the value of the definitionType record component
    • method

      public Method method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component