@Value.Lazy
    @Override
    public JacksonMode jacksonSerializeMode() {
      boolean wasJacksonSerialize = false;
      for (AnnotationMirror a : element().getAnnotationMirrors()) {
        TypeElement e = (TypeElement) a.getAnnotationType().asElement();
        if (!wasJacksonSerialize && e.getQualifiedName().contentEquals(JACKSON_SERIALIZE)) {
          wasJacksonSerialize = true;
        }
        if (e.getQualifiedName().contentEquals(JACKSON_DESERIALIZE)) {
          for (ExecutableElement attr : a.getElementValues().keySet()) {
            if (attr.getSimpleName().contentEquals("builder")) {
              // If builder attribute is specified, we don't consider this as
              // our, immutables, business to generate anything.
              return JacksonMode.BUILDER;
            }
          }
          return JacksonMode.DELEGATED;
        }
      }
      return wasJacksonSerialize
          ? JacksonMode.DELEGATED
          : JacksonMode.NONE;
    }
returns this class if it's top level or enclosing top level type.
@return accossiated top level type.
value-processor/src/org/immutables/value/processor/meta/Proto.java