Package io.micronaut.sourcegen.model
Record Class TypeDef.TypeVariable
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.model.TypeDef.TypeVariable
- Record Components:
name- The variable namebounds- The boundsnullable- The nullable
- All Implemented Interfaces:
TypeDef
- Enclosing interface:
- TypeDef
public static record TypeDef.TypeVariable(String name, List<TypeDef> bounds, boolean nullable)
extends Record
implements TypeDef
The type variable ref.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.sourcegen.model.TypeDef
TypeDef.Annotated, TypeDef.AnnotatedTypeDef, TypeDef.Array, TypeDef.Primitive, TypeDef.TypeVariable, TypeDef.Wildcard -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTypeVariable(String name) TypeVariable(String name, List<TypeDef> bounds) TypeVariable(String name, List<TypeDef> bounds, boolean nullable) Creates an instance of aTypeVariablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleannullable()Returns the value of thenullablerecord component.static TypeDef.TypeVariablefinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.sourcegen.model.TypeDef
annotated, annotated, array, array, isArray, isNullable, isPrimitive
-
Constructor Details
-
Method Details
-
of
public static TypeDef.TypeVariable of(String name, io.micronaut.inject.ast.ClassElement classElement) -
makeNullable
- Specified by:
makeNullablein interfaceTypeDef- Returns:
- A new nullable type
-
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
-
bounds
Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-
nullable
public boolean nullable()Returns the value of thenullablerecord component.- Returns:
- the value of the
nullablerecord component
-