Package com.xebialabs.deployit.plugin.api.reflect

## Class Type

- java.lang.Object
- - com.xebialabs.deployit.plugin.api.reflect.Type

- All Implemented Interfaces:
    `java.io.Serializable`

      public final class Type
      extends java.lang.Object
      implements java.io.Serializable

  Encapsulates the metadata about the type of a `ConfigurationItem`, such as: prefix, name, type hierarchy, the source registry etc. This class also provides static methods to retrieve the Type of a CI by name or by class from the DescriptorRegistry.
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object o)` |
    `boolean` | `exists()` |
    `Descriptor` | `getDescriptor()` |
    `java.lang.String` | `getName()` |
    `java.lang.String` | `getPrefix()` |
    `DescriptorRegistryId` | `getTypeSource()` |
    `int` | `hashCode()` |
    `boolean` | `instanceOf​(Type selfOrSuperType)` |
    `boolean` | `isSubTypeOf​(Type superType)` |
    `boolean` | `isSuperTypeOf​(Type subType)` |
    `java.lang.String` | `toString()` |
    `static Type` | `valueOf​(java.lang.Class<?> ciClass)` |
    `static Type` | `valueOf​(java.lang.String typeName)` |
    `static Type` | `valueOf​(java.lang.String prefix, java.lang.String simpleName)` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### valueOf

          public static Type valueOf​(java.lang.Class<?> ciClass)

      Parameters:
        `ciClass` - A `ConfigurationItem` class object.
      Returns:
        The Type representation of the given CI class.

    - #### valueOf

          public static Type valueOf​(java.lang.String typeName)

      Parameters:
        `typeName` - The prefixed name of a `ConfigurationItem` class.
      Returns:
        The Type representation of the given CI class prefixed name.

    - #### valueOf

          public static Type valueOf​(java.lang.String prefix,
                                     java.lang.String simpleName)

      Parameters:
        `prefix` - The CI namespace for the specified `ConfigurationItem`.
        `simpleName` - The simple name for the specified `ConfigurationItem`.
      Returns:
        The Type representation of the given CI.

    - #### getDescriptor

          public Descriptor getDescriptor()

      Returns:
        The metadata about this `ConfigurationItem`.

    - #### isSubTypeOf

          public boolean isSubTypeOf​(Type superType)

      Parameters:
        `superType` - The super type against which to verify the inheritance relationship.
      Returns:
        Whether this type is a subtype of the given type.

    - #### instanceOf

          public boolean instanceOf​(Type selfOrSuperType)

      Parameters:
        `selfOrSuperType` - The type against which to verify the "instance of" relationship
      Returns:
        Whether this type is a instance of the given type.

    - #### isSuperTypeOf

          public boolean isSuperTypeOf​(Type subType)

      Parameters:
        `subType` - The sub type against which to verify the inheritance relationship.
      Returns:
        Whether this type is a super type of the given type.

    - #### exists

          public boolean exists()

      Returns:
        Whether this type is a registered CI.

    - #### getPrefix

          public java.lang.String getPrefix()

      Returns:
        The CI namespace for this type.

    - #### getName

          public java.lang.String getName()

      Returns:
        The simple name for this type.

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getTypeSource

          public DescriptorRegistryId getTypeSource()

      Returns:
        The id of the descriptor registry.