Package io.micronaut.sourcegen.model
Record Class ClassTypeDef.Parameterized
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.model.ClassTypeDef.Parameterized
- Record Components:
rawType
- The raw type definitiontypeArguments
- The type arguments
- All Implemented Interfaces:
ClassTypeDef
,TypeDef
- Enclosing interface:
- ClassTypeDef
public static record ClassTypeDef.Parameterized(ClassTypeDef rawType, List<TypeDef> typeArguments)
extends Record
implements ClassTypeDef
The parameterized type definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.sourcegen.model.ClassTypeDef
ClassTypeDef.ClassDefType, ClassTypeDef.ClassElementType, ClassTypeDef.ClassName, ClassTypeDef.JavaClass, ClassTypeDef.Parameterized
Nested classes/interfaces inherited from interface io.micronaut.sourcegen.model.TypeDef
TypeDef.Array, TypeDef.Primitive, TypeDef.TypeVariable, TypeDef.Wildcard
-
Field Summary
Fields inherited from interface io.micronaut.sourcegen.model.ClassTypeDef
OBJECT
-
Constructor Summary
ConstructorDescriptionParameterized
(ClassTypeDef rawType, List<TypeDef> typeArguments) Creates an instance of aParameterized
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getName()
final int
hashCode()
Returns a hash code value for this object.boolean
rawType()
Returns the value of therawType
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetypeArguments
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.sourcegen.model.ClassTypeDef
doThrow, doThrow, getPackageName, getSimpleName, instantiate, instantiate, instantiate, invokeStatic, invokeStatic, isEnum
Methods inherited from interface io.micronaut.sourcegen.model.TypeDef
instantiateArray, instantiateArray, instantiateArray, isArray, isPrimitive
-
Constructor Details
-
Parameterized
Creates an instance of aParameterized
record class.- Parameters:
rawType
- the value for therawType
record componenttypeArguments
- the value for thetypeArguments
record component
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceClassTypeDef
- Returns:
- The type name
-
isNullable
public boolean isNullable()- Specified by:
isNullable
in interfaceTypeDef
- Returns:
- Is nullable type
-
makeNullable
- Specified by:
makeNullable
in interfaceClassTypeDef
- Specified by:
makeNullable
in 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
rawType
Returns the value of therawType
record component.- Returns:
- the value of the
rawType
record component
-
typeArguments
Returns the value of thetypeArguments
record component.- Returns:
- the value of the
typeArguments
record component
-