Package io.micronaut.sourcegen.model
Record Class TypeDef.Array
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.model.TypeDef.Array
- Record Components:
componentType- The array component typedimensions- The dimensionsnullable- Is nullable
- All Implemented Interfaces:
TypeDef
- Enclosing interface:
- TypeDef
public static record TypeDef.Array(TypeDef componentType, int dimensions, boolean nullable)
extends Record
implements TypeDef
The type for representing an array.
- Since:
- 1.0
- Author:
- Andriy Dmytruk
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentTyperecord component.intReturns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisArray()booleanbooleanbooleannullable()Returns the value of thenullablerecord component.final 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, instantiateArray, instantiateArray, instantiateArray
-
Constructor Details
-
Array
Creates an instance of aArrayrecord class.- Parameters:
componentType- the value for thecomponentTyperecord componentdimensions- the value for thedimensionsrecord componentnullable- the value for thenullablerecord component
-
-
Method Details
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceTypeDef- Returns:
- Is nullable type
-
makeNullable
- Specified by:
makeNullablein interfaceTypeDef- Returns:
- A new nullable type
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceTypeDef- Returns:
- Is primitive type
-
isArray
public boolean isArray() -
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 '=='. -
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-
dimensions
public int dimensions()Returns the value of thedimensionsrecord component.- Returns:
- the value of the
dimensionsrecord component
-
nullable
public boolean nullable()Returns the value of thenullablerecord component.- Returns:
- the value of the
nullablerecord component
-