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
-
Nested Class Summary
Nested classes/interfaces inherited from interface TypeDef
TypeDef.Annotated, TypeDef.AnnotatedTypeDef, TypeDef.Array, TypeDef.Primitive, TypeDef.TypeVariable, TypeDef.Wildcard -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarray()Create an array type.array(int dimension) Create an array type.Returns 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.instantiate(int size) Instantiate an array of this class.instantiate(ExpressionDef... expressions) Instantiate an array of this class.instantiate(List<? extends ExpressionDef> expressions) Instantiate an array of this class.booleanisArray()booleanbooleanbooleannullable()Returns the value of thenullablerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface TypeDef
annotated, annotated, resolveTypeVariables
-
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
-
array
Description copied from interface:TypeDefCreate an array type. -
array
Description copied from interface:TypeDefCreate an array type. -
instantiate
Instantiate an array of this class.- Parameters:
size- The size of the array- Returns:
- The instantiate expression
- Since:
- 1.5
-
instantiate
Instantiate an array of this class.- Parameters:
expressions- The expressions- Returns:
- The instantiate expression
- Since:
- 1.5
-
instantiate
Instantiate an array of this class.- Parameters:
expressions- The items expressions- Returns:
- The instantiate expression
- Since:
- 1.5
-
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
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-