org.jbpm.process.core.datatype.impl.type

## Class EnumDataType

- java.lang.Object
- - org.jbpm.process.core.datatype.impl.type.EnumDataType

- All Implemented Interfaces:
    Externalizable, Serializable, DataType

      public class EnumDataType
      extends Object
      implements DataType

  Representation of an Enum datatype.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnumDataType()`
    `EnumDataType(String className)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClassName()`
    `String` | `getStringType()` Returns the corresponding Java type of this datatype
    `Map<String,Object>` | `getValueMap()`
    `Map<String,Object>` | `getValueMap(ClassLoader classLoader)`
    `String[]` | `getValueNames()`
    `String[]` | `getValueNames(ClassLoader classLoader)`
    `Object[]` | `getValues()`
    `Object[]` | `getValues(ClassLoader classLoader)`
    `void` | `readExternal(ObjectInput in)`
    `Object` | `readValue(String value)`
    `void` | `setClassName(String className)`
    `Object` | `valueOf(String value)` Tries to convert string parameter to an object of this type
    `boolean` | `verifyDataType(Object value)` Returns true if the given value is a valid value of this data type.
    `void` | `writeExternal(ObjectOutput out)`
    `String` | `writeValue(Object value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EnumDataType

          public EnumDataType()

    - #### EnumDataType

          public EnumDataType(String className)

  - ### Method Detail

    - #### getClassName

          public String getClassName()

    - #### setClassName

          public void setClassName(String className)

    - #### readExternal

          public void readExternal(ObjectInput in)
                            throws IOException,
                                   ClassNotFoundException

      Specified by:
        `readExternal` in interface `Externalizable`
      Throws:
        `IOException`
        `ClassNotFoundException`

    - #### writeExternal

          public void writeExternal(ObjectOutput out)
                             throws IOException

      Specified by:
        `writeExternal` in interface `Externalizable`
      Throws:
        `IOException`

    - #### verifyDataType

          public boolean verifyDataType(Object value)

      Description copied from interface: `DataType`
      Returns true if the given value is a valid value of this data type.
      Specified by:
        `verifyDataType` in interface `DataType`

    - #### readValue

          public Object readValue(String value)

      Specified by:
        `readValue` in interface `DataType`

    - #### writeValue

          public String writeValue(Object value)

      Specified by:
        `writeValue` in interface `DataType`

    - #### getStringType

          public String getStringType()

      Description copied from interface: `DataType`
      Returns the corresponding Java type of this datatype
      Specified by:
        `getStringType` in interface `DataType`

    - #### getValues

          public Object[] getValues(ClassLoader classLoader)

    - #### getValues

          public Object[] getValues()

    - #### getValueNames

          public String[] getValueNames(ClassLoader classLoader)

    - #### getValueNames

          public String[] getValueNames()

    - #### getValueMap

          public Map<String,Object> getValueMap()

    - #### getValueMap

          public Map<String,Object> getValueMap(ClassLoader classLoader)

    - #### valueOf

          public Object valueOf(String value)

      Description copied from interface: `DataType`
      Tries to convert string parameter to an object of this type
      Specified by:
        `valueOf` in interface `DataType`
      Parameters:
        `value` - to be converted. For the sake of performance, it is assumed to not be null and not of `this` data type.
      Returns:
        object converted to this type, if not possible to convert, the same object passed as parameter

Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.