code: @Override
      public <E> CollectionAttribute<X, E> getDeclaredCollection(String paramString, Class<E> paramClass)
      {
          PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramString);
  
          if (onCheckCollectionAttribute(declaredAttrib, paramClass))
          {
              return (CollectionAttribute<X, E>) declaredAttrib;
          }
  
          throw new IllegalArgumentException(
                  "attribute of the given name and type is not present in the managed type, for name:" + paramString
                          + " , type:" + paramClass);
      }
docs: /*
  (non-Javadoc)
  
  @see
  javax.persistence.metamodel.ManagedType#getDeclaredCollection(java.lang
  .String, java.lang.Class)