src/main/java/com/googlecode/objectify/impl/translate/ObjectTranslatorFactory.java
@Override
	public Translator<Object, Object> create(final TypeKey<Object> tk, final CreateContext createCtx, final Path path) {
		if (tk.getTypeAsClass() != Object.class)
			return null;

		return new NullSafeTranslator<Object, Object>() {
			@Override
			protected Object loadSafe(final Value<Object> value, final LoadContext ctx, final Path path) throws SkipException {
				return value.get();
			}

			@Override
			protected Value<Object> saveSafe(final Object pojo, final boolean index, final SaveContext saveCtx, final Path path) throws SkipException {
				final TypeKey<Object> runtimeTypeKey = new TypeKey<>(pojo.getClass());

				// We really only need the createctx so that the translators can get a factory.
				final Translator<Object, Object> realTranslator = translators.get(runtimeTypeKey, createCtx, path);
				return realTranslator.save(pojo, index, saveCtx, path);
			}
		};
	}
@Override
	public Translator<Object, Object> create(final TypeKey<Object> tk, final CreateContext createCtx, final Path path) {
		if (tk.getTypeAsClass() != Object.class)
			return null;

		return new NullSafeTranslator<Object, Object>() {
			@Override
			protected Object loadSafe(final Value<Object> value, final LoadContext ctx, final Path path) throws SkipException {
				return value.get();
			}

			@Override
			protected Value<Object> saveSafe(final Object pojo, final boolean index, final SaveContext saveCtx, final Path path) throws SkipException {
				final TypeKey<Object> runtimeTypeKey = new TypeKey<>(pojo.getClass());

				// We really only need the createctx so that the translators can get a factory.
				final Translator<Object, Object> realTranslator = translators.get(runtimeTypeKey, createCtx, path);
				return realTranslator.save(pojo, index, saveCtx, path);
			}
		};
	}
@ Override public Translator < Object , Object > create ( final TypeKey < Object > tk , final CreateContext createCtx , final Path path ) { if ( tk . getTypeAsClass ( ) != Object . class ) return null ; return new NullSafeTranslator < Object , Object > ( ) { @ Override protected Object loadSafe ( final Value < Object > value , final LoadContext ctx , final Path path ) throws SkipException { return value . get ( ) ; } @ Override protected Value < Object > saveSafe ( final Object pojo , final boolean index , final SaveContext saveCtx , final Path path ) throws SkipException { final TypeKey < Object > runtimeTypeKey = new TypeKey <> ( pojo . getClass ( ) ) ; // We really only need the createctx so that the translators can get a factory. final Translator < Object , Object > realTranslator = translators . get ( runtimeTypeKey , createCtx , path ) ; return realTranslator . save ( pojo , index , saveCtx , path ) ; } } ; }
/*
/ *