org.apache.torque.templates.typemapping

## Enum JavaType

- java.lang.Object
- - java.lang.Enum<JavaType>
  - - org.apache.torque.templates.typemapping.JavaType

- All Implemented Interfaces:
    Serializable, Comparable<JavaType>

      public enum JavaType
      extends Enum<JavaType>

  An enum for all java types known to the generator.
  Version:
    "Id: $

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BIG_DECIMAL` java.math.BigDecimal.
    `BOOLEAN_OBJECT` java.lang.Boolean.
    `BOOLEAN_PRIMITIVE` primitive boolean.
    `BYTE_OBJECT` java.lang.Byte.
    `BYTE_PRIMITIVE` primitive byte.
    `BYTE_PRIMITIVE_ARRAY` primitive byte array.
    `CHAR_OBJECT` java.lang.Char.
    `CHAR_PRIMITIVE` primitive char.
    `DATE` java.util.Date.
    `DOUBLE_OBJECT` java.lang.Double.
    `DOUBLE_PRIMITIVE` primitive double.
    `ENUM` java.lang.Enum.
    `FLOAT_OBJECT` java.lang.Float.
    `FLOAT_PRIMITIVE` primitive float.
    `INTEGER_OBJECT` java.lang.Integer.
    `INTEGER_PRIMITIVE` primitive int.
    `LONG_OBJECT` java.lang.Long.
    `LONG_PRIMITIVE` primitive long.
    `SHORT_OBJECT` java.lang.Short.
    `SHORT_PRIMITIVE` primitive short.
    `STRING` java.lang.String.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClassName()` Returns the class name.
    `String` | `getFullClassName()` Returns the class name, if necessary qualified with the package name.
    `String` | `getPackagePrefix()` Returns the package prefix.
    `boolean` | `isNumber()` Returns whether the type is a number.
    `boolean` | `isPrimitive()` Returns whether the type is a primitive type.
    `static JavaType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static JavaType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### STRING

          public static final JavaType STRING

      java.lang.String.

    - #### BIG_DECIMAL

          public static final JavaType BIG_DECIMAL

      java.math.BigDecimal.

    - #### BOOLEAN_PRIMITIVE

          public static final JavaType BOOLEAN_PRIMITIVE

      primitive boolean.

    - #### BOOLEAN_OBJECT

          public static final JavaType BOOLEAN_OBJECT

      java.lang.Boolean.

    - #### BYTE_PRIMITIVE

          public static final JavaType BYTE_PRIMITIVE

      primitive byte.

    - #### BYTE_OBJECT

          public static final JavaType BYTE_OBJECT

      java.lang.Byte.

    - #### SHORT_PRIMITIVE

          public static final JavaType SHORT_PRIMITIVE

      primitive short.

    - #### SHORT_OBJECT

          public static final JavaType SHORT_OBJECT

      java.lang.Short.

    - #### INTEGER_PRIMITIVE

          public static final JavaType INTEGER_PRIMITIVE

      primitive int.

    - #### INTEGER_OBJECT

          public static final JavaType INTEGER_OBJECT

      java.lang.Integer.

    - #### LONG_PRIMITIVE

          public static final JavaType LONG_PRIMITIVE

      primitive long.

    - #### LONG_OBJECT

          public static final JavaType LONG_OBJECT

      java.lang.Long.

    - #### FLOAT_PRIMITIVE

          public static final JavaType FLOAT_PRIMITIVE

      primitive float.

    - #### FLOAT_OBJECT

          public static final JavaType FLOAT_OBJECT

      java.lang.Float.

    - #### DOUBLE_PRIMITIVE

          public static final JavaType DOUBLE_PRIMITIVE

      primitive double.

    - #### DOUBLE_OBJECT

          public static final JavaType DOUBLE_OBJECT

      java.lang.Double.

    - #### CHAR_PRIMITIVE

          public static final JavaType CHAR_PRIMITIVE

      primitive char.

    - #### CHAR_OBJECT

          public static final JavaType CHAR_OBJECT

      java.lang.Char.

    - #### BYTE_PRIMITIVE_ARRAY

          public static final JavaType BYTE_PRIMITIVE_ARRAY

      primitive byte array.

    - #### DATE

          public static final JavaType DATE

      java.util.Date.

    - #### ENUM

          public static final JavaType ENUM

      java.lang.Enum.

  - ### Method Detail

    - #### values

          public static JavaType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (JavaType c : JavaType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static JavaType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### isPrimitive

          public boolean isPrimitive()

      Returns whether the type is a primitive type.
      Returns:
        true if the type is a primitive type, false otherwise.

    - #### isNumber

          public boolean isNumber()

      Returns whether the type is a number.
      Returns:
        true if the type is a number, false otherwise.

    - #### getClassName

          public String getClassName()

      Returns the class name.
      Returns:
        the unqualified class name.

    - #### getPackagePrefix

          public String getPackagePrefix()

      Returns the package prefix.
      Returns:
        the package prefix, or null.

    - #### getFullClassName

          public String getFullClassName()

      Returns the class name, if necessary qualified with the package name.
      Returns:
        the full class name.

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.