// Add Hibernate's @Type to each entity String field annotated with @Lob
if (field.isAnnotationPresent(Lob.class)) {
Annotation typeAnnot = new Annotation("org.hibernate.annotations.Type", constPool);
if (String.class.equals(field.getType())) {
typeAnnot.addMemberValue("type",
new StringMemberValue("org.hibernate.type.StringClobType", constPool));
} else if (field.getType().isArray()) {
typeAnnot.addMemberValue("type",
new StringMemberValue("org.hibernate.type.ByteArrayBlobType", constPool));
}
annotAttr = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
annotAttr.addAnnotation(typeAnnot);
}