src/main/java/com/googlecode/objectify/impl/Registrar.java
public <T> void register(Class<T> clazz) {
		// There are two possible cases
		// 1) This might be a simple class with @Entity
		// 2) This might be a class annotated with @Subclass

		// @Entity is inherited, but we only create entity metadata for the class with the @Entity declaration
		if (TypeUtils.isDeclaredAnnotationPresent(clazz, Entity.class)) {
			String kind = Key.getKind(clazz);

			// If we are already registered, ignore
			if (this.byKind.containsKey(kind))
				return;

			EntityMetadata<T> cmeta = new EntityMetadata<>(this.fact, clazz);
			this.byKind.put(kind, cmeta);

			if (cmeta.getCacheExpirySeconds() != null)
				this.cacheEnabled = true;
		}
		else if (clazz.isAnnotationPresent(Subclass.class)) {
			// We just need to make sure that a translator was created
			fact.getTranslators().getRoot(clazz);
		}
		else {
			throw new IllegalArgumentException(clazz + " must be annotated with either @Entity or @Subclass");
		}
	}
public <T> void register(Class<T> clazz) {
		// There are two possible cases
		// 1) This might be a simple class with @Entity
		// 2) This might be a class annotated with @Subclass

		// @Entity is inherited, but we only create entity metadata for the class with the @Entity declaration
		if (TypeUtils.isDeclaredAnnotationPresent(clazz, Entity.class)) {
			String kind = Key.getKind(clazz);

			// If we are already registered, ignore
			if (this.byKind.containsKey(kind))
				return;

			EntityMetadata<T> cmeta = new EntityMetadata<>(this.fact, clazz);
			this.byKind.put(kind, cmeta);

			if (cmeta.getCacheExpirySeconds() != null)
				this.cacheEnabled = true;
		}
		else if (clazz.isAnnotationPresent(Subclass.class)) {
			// We just need to make sure that a translator was created
			fact.getTranslators().getRoot(clazz);
		}
		else {
			throw new IllegalArgumentException(clazz + " must be annotated with either @Entity or @Subclass");
		}
	}
<p>All @Entity and @Subclass classes (for both entity and embedded classes)
must be registered before using Objectify to load or save data.  This method
must be called in a single-threaded mode sometime around application initialization.</p>

<p>Re-registering a class has no effect.</p>

@param clazz must be annotated with either @Entity or @Subclass