Record Class ELMethods.Candidate<T>

java.lang.Object
java.lang.Record
io.micronaut.el.runtime.ELMethods.Candidate<T>
Type Parameters:
T - The type of the method the candidate stands for
Record Components:
value - The method this candidate stands for
parameterTypes - Its parameter types
varArgs - Whether it is of variable arity
isStatic - Whether it is static
bridge - Whether it is a bridge method, which loses a tie against the method it bridges to
Enclosing class:
ELMethods

public static record ELMethods.Candidate<T>(T value, Class<?>[] parameterTypes, boolean varArgs, boolean isStatic, boolean bridge) extends Record
A method the selection of the section 1.6 can choose between, with what the selection needs read once.

The selection is defined by the parameter types alone, so a candidate carries whatever the caller wants back: the reflective resolvers select a java.lang.reflect.Method, while a registry of directly dispatched methods selects its own descriptor.

Since:
1.0
Author:
Denis Stepanov
  • Constructor Summary

    Constructors
    Constructor
    Description
    Candidate(T value, Class<?>[] parameterTypes)
    A candidate for a method that is neither of variable arity, nor static, nor a bridge.
    Candidate(T value, Class<?>[] parameterTypes, boolean varArgs, boolean isStatic, boolean bridge)
    Creates an instance of a Candidate record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the bridge record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isStatic record component.
    Class<?>[]
    Returns the value of the parameterTypes record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the value record component.
    boolean
    Returns the value of the varArgs record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Candidate

      public Candidate(T value, Class<?>[] parameterTypes)
      A candidate for a method that is neither of variable arity, nor static, nor a bridge.
      Parameters:
      value - The method this candidate stands for
      parameterTypes - Its parameter types
    • Candidate

      public Candidate(T value, Class<?>[] parameterTypes, boolean varArgs, boolean isStatic, boolean bridge)
      Creates an instance of a Candidate record class.
      Parameters:
      value - the value for the value record component
      parameterTypes - the value for the parameterTypes record component
      varArgs - the value for the varArgs record component
      isStatic - the value for the isStatic record component
      bridge - the value for the bridge 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • value

      public T value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • parameterTypes

      public Class<?>[] parameterTypes()
      Returns the value of the parameterTypes record component.
      Returns:
      the value of the parameterTypes record component
    • varArgs

      public boolean varArgs()
      Returns the value of the varArgs record component.
      Returns:
      the value of the varArgs record component
    • isStatic

      public boolean isStatic()
      Returns the value of the isStatic record component.
      Returns:
      the value of the isStatic record component
    • bridge

      public boolean bridge()
      Returns the value of the bridge record component.
      Returns:
      the value of the bridge record component