Class TranslationType<T>

java.lang.Object
de.espirit.firstspirit.webedit.plugin.translation.TranslationType<T>
Type Parameters:
T - The type of translatable commodity.

public class TranslationType<T> extends Object
Content type, a typed wrapper for translatable content flavors.
Since:
5.2.33
  • Field Details

    • TEXT

      public static final TranslationType<String> TEXT
      Simple text content of type text/plain.
      Since:
      5.2.33
    • XML

      public static final TranslationType<String> XML
      XML based content. This content type will usually be used as a transfer format, which might contain unique identifying attributes. The basic structure of the given XML content should be preserved during a translation, in order to keep the state of the underlying content object.
      Since:
      5.2.33
  • Method Details

    • cast

      @Contract("null -> null") public T cast(Object object)
      Cast the given object to the underlying type. Will throw ClassCastException, if the given object is not assignable to this object's raw type, but will not check for the generic type.
      Parameters:
      object - The object to be cast.
      Returns:
      The cast instance.
      Since:
      5.2.33