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.ParameterizedNested 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
ConstructorsConstructorDescriptionParameterized(ClassTypeDef rawType, List<TypeDef> typeArguments) Creates an instance of aParameterizedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getName()final inthashCode()Returns a hash code value for this object.booleanrawType()Returns the value of therawTyperecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeArgumentsrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.sourcegen.model.ClassTypeDef
doThrow, doThrow, getPackageName, getSimpleName, instantiate, instantiate, instantiate, invokeStatic, invokeStatic, isEnumMethods inherited from interface io.micronaut.sourcegen.model.TypeDef
instantiateArray, instantiateArray, instantiateArray
-
Constructor Details
-
Parameterized
Creates an instance of aParameterizedrecord class.- Parameters:
rawType- the value for therawTyperecord componenttypeArguments- the value for thetypeArgumentsrecord component
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceClassTypeDef- Returns:
- The type name
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceTypeDef- Returns:
- Is nullable type
-
makeNullable
- Specified by:
makeNullablein interfaceClassTypeDef- 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. All components in this record class are compared withObjects::equals(Object,Object). -
rawType
Returns the value of therawTyperecord component.- Returns:
- the value of the
rawTyperecord component
-
typeArguments
Returns the value of thetypeArgumentsrecord component.- Returns:
- the value of the
typeArgumentsrecord component
-