Krotick
10/30/2019, 4:09 AM@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)]
[]
Qqq::getMarket.annotations
gives me an error (and I don't see an annotation there in the decompiled bytecode). The decompiled Java looks like this:
@DynamoDBTypeConvertedEnum
@NotNull
private CountryCode market;
Shawn A
10/30/2019, 12:13 PMKrotick
11/04/2019, 7:32 PM