The annotation looks like this:
@DynamoDBTyped(DynamoDBMapperFieldModel.DynamoDBAttributeType.S)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
public @interface DynamoDBTypeConvertedEnum {}
My data class (simplified version) loks like this:
@DynamoDBTable(tableName = "REPLACED_BY_VALUE_IN_ENV")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class Qqq(
@DynamoDBTypeConvertedEnum
var market: CountryCode
)
I am trying to get annotations like this:
build.gradle.kts
implementation(kotlin("reflect"))
code
println(Qqq::class.annotations)
println(Qqq::market.annotations)
output
[@com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable(tableName=REPLACED_BY_VALUE_IN_ENV), @com.fasterxml.jackson.annotation.JsonInclude(valueFilter=class java.lang.Void, value=NON_EMPTY, contentFilter=class java.lang.Void, content=ALWAYS)]
[]