Record Class InvokedSignature

java.lang.Object
java.lang.Record
io.micronaut.sourcegen.generator.InvokedSignature
Record Components:
parameterTypes - The generic parameter types
varargs - Whether the last parameter takes varargs

@Internal public record InvokedSignature(List<TypeDef> parameterTypes, boolean varargs) extends Record
The signature an invoked method declares, which the erased model of the call does not carry: its generic parameter types, and whether it takes varargs.
Since:
2.3
  • Constructor Details

    • InvokedSignature

      public InvokedSignature(List<TypeDef> parameterTypes, boolean varargs)
      Creates an instance of a InvokedSignature record class.
      Parameters:
      parameterTypes - the value for the parameterTypes record component
      varargs - the value for the varargs record component
  • Method Details

    • resolve

      public static @Nullable InvokedSignature resolve(@Nullable ClassTypeDef owner, String methodName, List<TypeDef> parameterTypes, GenerationScope scope)
      The generic parameter types the invoked method declares, which the erased signature of the model does not carry. Resolved by loading the type, and failing that through the compiler.
      Parameters:
      owner - The type declaring the method, or null
      methodName - The method name
      parameterTypes - The parameter types of the method in the model, which name the overload
      scope - The scope of the file being written, which looks up a type the class loader lacks
      Returns:
      The signature, or null where the method cannot be resolved
    • 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.
    • parameterTypes

      public List<TypeDef> 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