Package com.vaadin.hilla.generator.model
Record Class TypeModel.Provided
java.lang.Object
java.lang.Record
com.vaadin.hilla.generator.model.TypeModel.Provided
- Record Components:
name- the name the type goes by in TypeScriptmodule- the module exporting it under that name, or empty for one the browser has
- All Implemented Interfaces:
TypeModel
- Enclosing interface:
TypeModel
public static record TypeModel.Provided(String name, String module, List<TypeModel> typeArguments, boolean optional, List<ConstraintModel> constraints, List<AnnotationModel> annotations)
extends Record
implements TypeModel
A type the generated TypeScript refers to by name rather than by
declaring it: one the browser has, such as a file, or one a module of the
framework exports, such as a signal.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.hilla.generator.model.TypeModel
TypeModel.ArrayOf, TypeModel.EntityRef, TypeModel.MapOf, TypeModel.Provided, TypeModel.Scalar, TypeModel.ScalarKind, TypeModel.TypeVariable -
Constructor Summary
ConstructorsConstructorDescriptionProvided(String name, String module, List<TypeModel> typeArguments, boolean optional, List<ConstraintModel> constraints, List<AnnotationModel> annotations) Creates an instance of aProvidedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.Returns the value of theconstraintsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.module()Returns the value of themodulerecord component.name()Returns the value of thenamerecord component.booleanoptional()Returns the value of theoptionalrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeArgumentsrecord component.withOptional(boolean optional) The same type, said to be absent or not as given.
-
Constructor Details
-
Provided
public Provided(String name, String module, List<TypeModel> typeArguments, boolean optional, List<ConstraintModel> constraints, List<AnnotationModel> annotations) Creates an instance of aProvidedrecord class.- Parameters:
name- the value for thenamerecord componentmodule- the value for themodulerecord componenttypeArguments- the value for thetypeArgumentsrecord componentoptional- the value for theoptionalrecord componentconstraints- the value for theconstraintsrecord componentannotations- the value for theannotationsrecord component
-
Provided
-
-
Method Details
-
withOptional
Description copied from interface:TypeModelThe same type, said to be absent or not as given.- Specified by:
withOptionalin interfaceTypeModel
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
module
Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-
typeArguments
Returns the value of thetypeArgumentsrecord component.- Returns:
- the value of the
typeArgumentsrecord component
-
optional
public boolean optional()Returns the value of theoptionalrecord component. -
constraints
Returns the value of theconstraintsrecord component.- Specified by:
constraintsin interfaceTypeModel- Returns:
- the value of the
constraintsrecord component
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceTypeModel- Returns:
- the value of the
annotationsrecord component
-