Enum Class ConversionRule

java.lang.Object
java.lang.Enum<ConversionRule>
org.apache.struts2.conversion.annotations.ConversionRule
All Implemented Interfaces:
Serializable, Comparable<ConversionRule>, Constable

public enum ConversionRule extends Enum<ConversionRule>
ConversionRule
Version:
$Id$
Author:
Rainer Hermanns
  • Enum Constant Details

    • PROPERTY

      public static final ConversionRule PROPERTY
    • COLLECTION

      @Deprecated(since="7.3.0") public static final ConversionRule COLLECTION
      Deprecated.
      since 7.3.0, use ELEMENT instead. The Collection_xxx key format has been superseded by Element_xxx since WebWork 2.1.x; both are handled identically by the engine, and Element_xxx additionally covers the values of a Map.
    • MAP

      public static final ConversionRule MAP
    • KEY

      public static final ConversionRule KEY
    • KEY_PROPERTY

      public static final ConversionRule KEY_PROPERTY
    • ELEMENT

      public static final ConversionRule ELEMENT
    • CREATE_IF_NULL

      public static final ConversionRule CREATE_IF_NULL
  • Method Details

    • values

      public static ConversionRule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ConversionRule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • prefix

      public String prefix()
      The prefix a conversion mapping key carries for this rule, as read back by DefaultObjectTypeDeterminer. PROPERTY and MAP have no prefix of their own: map and collection metadata is read through the Key_ and Element_ keys.

      COLLECTION deliberately derives Collection_, the deprecated spelling that DefaultObjectTypeDeterminer still falls back to (and logs an INFO about) for compatibility with existing annotations. Prefer ELEMENT, whose Element_ prefix is the current form.

      Returns:
      the mapping key prefix, never null; an empty string when the rule has none
      Since:
      7.3.0
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ConversionRule>