code: private <X> void validate(Class<X> clazz, boolean isEmbeddable)
      {
          final String mappedSuperClazzErrMsg = "Class:" + clazz
                  + "is annotated with @MappedSuperClass and @Entity not allowed";
          final String embeddableClazzErrMsg = "Class:" + clazz + "is annotated with @Embeddable and @Entity not allowed";
          if (clazz.isAnnotationPresent(Entity.class))
          {
              throw new MetamodelLoaderException(isEmbeddable ? embeddableClazzErrMsg : mappedSuperClazzErrMsg);
          }
      }
docs: Validate.
  
  @param <X>
  the generic type
  @param clazz
  the clazz
  @param isEmbeddable
  the is embeddable