use of com.sun.codemodel.JAnnotationUse in project jsonschema2pojo by joelittlejohn.
the class Jackson2Annotator method addJsonTypeInfoAnnotation.
protected void addJsonTypeInfoAnnotation(JDefinedClass jclass, String propertyName) {
JAnnotationUse jsonTypeInfo = jclass.annotate(JsonTypeInfo.class);
jsonTypeInfo.param("use", JsonTypeInfo.Id.CLASS);
jsonTypeInfo.param("include", JsonTypeInfo.As.PROPERTY);
// When not provided it will use default provided by "use" attribute
if (StringUtils.isNotBlank(propertyName)) {
jsonTypeInfo.param("property", propertyName);
}
}
Aggregations