@Override
  @Nullable
  public <T> T getState(@NotNull final FacetType<?, ?> type, @NotNull final Class<T> aClass) {
    String id = type.getStringId();
    //noinspection unchecked
    T state = (T)myFacetTypeStates.get(id);
    if (state == null) {
      FacetTypeStateBean bean = myBean.getFacetTypeElements().get(id);
      if (bean != null) {
        Element element = bean.getState();
        if (element != null) {
          state = XmlSerializer.deserialize(element, aClass);
        }
      }
    }
    return state;
  }
@Override
  @Nullable
  public <T> T getState(@NotNull final FacetType<?, ?> type, @NotNull final Class<T> aClass)