All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebean.enhance.entity.FieldAnnotationVisitor Maven / Gradle / Ivy

There is a newer version: 15.8.0
Show newest version
package io.ebean.enhance.entity;

import io.ebean.enhance.asm.AnnotationVisitor;

import static io.ebean.enhance.Transformer.EBEAN_ASM_VERSION;

final class FieldAnnotationVisitor extends AnnotationVisitor {

  private final FieldMeta fieldMeta;

  FieldAnnotationVisitor(FieldMeta fieldMeta, AnnotationVisitor visitor) {
    super(EBEAN_ASM_VERSION, visitor);
    this.fieldMeta = fieldMeta;
  }

  @Override
  public void visit(String name, Object value) {
    super.visit(name, value);
    if ("nullable".equals(name) && "false".equals(String.valueOf(value))) {
      fieldMeta.setNotNull();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy