-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Across the library, the names of types are usually stored as String. This can include things like:
MyMarker
com.something.MyMarker
but also
<TypeA, MyMarker>
(typeArguments)
<T : TypeA, R : com.something.MyMarker>
(typeParameters)
and all are simply stored as String.
This, however, can create unforeseen bugs, such as #170 where some nested interface that should be referred to as `My Type`.MyInterface
is referred to as My Type.MyInterface
, breaking code generation.
It's also not clear whether an argument called name
stores a type with periods or not. Sometimes it's accompanied with shortName
meaning name
is fully qualified. Other times it's accompanied with fqName
meaning name
is a short name...
My suggestion is to either create a one-size-fits-all typing solution where ` quotes can be provided in any part of the type name, or use a library like KotlinPoet that can do it for us.
We already have a similar thing for ValidFieldName
, but not for the types yet.