class SortCustomResourceDefinitionVersionDecorator
    extends CustomResourceDefinitionDecorator<CustomResourceDefinitionSpecFluent<?>> {
  public SortCustomResourceDefinitionVersionDecorator(String name) {
    super(name);
  }

  @Override
  public void andThenVisit(CustomResourceDefinitionSpecFluent<?> spec, ObjectMeta resourceMeta) {
    spec.withVersions(KubernetesVersionPriority.sortByPriority(spec.buildVersions(), CustomResourceDefinitionVersion::getName));
  }

  @Override
  public Class<? extends Decorator>[] after() {
    return new Class[] { EnsureSingleStorageVersionDecorator.class };
  }

  @Override
  public String toString() {<FILL_FUNCTION_BODY>}

}

    return getClass().getName() + " [name:" + getName() + "]";
  
<methods>public void <init>(java.lang.String) ,public void andThenVisit(CustomResourceDefinitionSpecFluent<?>, ObjectMeta) <variables>