Package com.vaadin.hilla.generator.model
Record Class MethodModel
java.lang.Object
java.lang.Record
com.vaadin.hilla.generator.model.MethodModel
- Record Components:
returnType- what a call returns, or the values a subscription sends, or the signal a value is shared through
public record MethodModel(String name, List<ParameterModel> parameters, TypeModel returnType, MethodModel.Kind kind)
extends Record
A method of a browser callable class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the client reaches a method: it calls most of them, subscribes to the ones sending a series of values, and builds a signal of its own for the ones sharing a value with the server. -
Constructor Summary
ConstructorsConstructorDescriptionMethodModel(String name, List<ParameterModel> parameters, TypeModel returnType, MethodModel.Kind kind) Creates an instance of aMethodModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.Returns the value of theparametersrecord component.Returns the value of thereturnTyperecord component.signal()The signal the value of a method is shared through, which is the type it returns.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MethodModel
public MethodModel(String name, List<ParameterModel> parameters, TypeModel returnType, MethodModel.Kind kind) Creates an instance of aMethodModelrecord class.- Parameters:
name- the value for thenamerecord componentparameters- the value for theparametersrecord componentreturnType- the value for thereturnTyperecord componentkind- the value for thekindrecord component
-
-
Method Details
-
signal
The signal the value of a method is shared through, which is the type it returns.- Throws:
IllegalStateException- if the method shares no value through a signal
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-