Package com.googlecode.objectify.annotation

Examples of com.googlecode.objectify.annotation.Translate


    this.earlyOnly = earlyOnly;
  }
 
  @Override
  public Translator<Object, Object> create(TypeKey<Object> tk, CreateContext ctx, Path path) {
    final Translate translateAnno = tk.getAnnotation(Translate.class);

    if (translateAnno == null)
      return null;

    if (earlyOnly && !translateAnno.early())
      return null;

    @SuppressWarnings("unchecked")
    TranslatorFactory<Object, Object> transFact = (TranslatorFactory<Object, Object>)ctx.getFactory().construct(translateAnno.value());

    Translator<Object, Object> trans = transFact.create(tk, ctx, path);
    if (trans == null) {
      path.throwIllegalState("TranslatorFactory " + transFact + " was unable to produce a Translator for " + tk.getType());
      return null// never gets here
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.annotation.Translate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.