TypeDefinitionRename (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.meta

## Interface TypeDefinitionRename

- All Superinterfaces:
    MetadataObject, MetaDefinition, TypeDefinition, WeakReferenceTarget
  All Known Implementing Classes:
    TypeDefinitionRenameImpl

      public interface TypeDefinitionRename
      extends TypeDefinition

  Specifies the definition a property type that has the same structure and representation as its underlying type but has a different meaning.

  An example of a rename type is the position type, which is used as another name for a 64-bit signed integer value (`Int64`).

  See Also:
    `TypeCategory.Rename`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `TypeDefinitionRename` | `clone()` Create a cloned copy of this rename type definition.
    `PropertyValue` | `createValueFromBaseValue(PropertyValue propertyValue)` Returns a property value defined by this rename type definition containing, wrapping the given property value.
    `TypeDefinition` | `getBaseType()` Returns the type definition of the base type for which this rename type definition is an alias.
    `PropertyValue` | `getBaseValue(PropertyValue propertyValue)` Returns a property value of the base type, unwrapping the the given property value that is defined by this rename type definition.

    - ### Methods inherited from interface tv.amwa.maj.meta.TypeDefinition

      `createFromBytes, createValue, getPropertyValue, getTypeCategory, lengthAsBytes, resolveReferences, setPropertyValue, writeAsBytes, writeAsStructuredStorageBytes`

    - ### Methods inherited from interface tv.amwa.maj.meta.MetaDefinition

      `appendMetadictXML, deepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getDescription, getName, getNamespace, getPrefix, getSymbol, hashCode, setAAFNamesInUse, setDescription, setName, setNamespace, setPrefix, setSymbol, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.WeakReferenceTarget

      `getWeakTargetReference`

- - ### Method Detail

    - #### getBaseType

          TypeDefinition getBaseType()

      Returns the type definition of the base type for which this rename type definition is an alias. The base type is also known as the renamed type.

      Returns:
        Base type for this rename type definition.

    - #### getBaseValue

          PropertyValue getBaseValue(PropertyValue propertyValue)
                              throws NullPointerException,
                                     IllegalPropertyValueException

      Returns a property value of the base type, unwrapping the the given property value that is defined by this rename type definition.

      Note that the value returned may contain a reference to the same internal value as the given property value and this data is not necessarily a new copy.

      Parameters:
        `propertyValue` - Property value defined by the rename type definition.
      Returns:
        Equivalent property value defined by the base type definition.
      Throws:
        `NullPointerException` - The given property value is `null`.
        `IllegalPropertyValueException` - The given property value is not compatible with this rename type definition.
      See Also:
        `getBaseType()`

    - #### createValueFromBaseValue

          PropertyValue createValueFromBaseValue(PropertyValue propertyValue)
                                          throws NullPointerException,
                                                 IllegalPropertyValueException

      Returns a property value defined by this rename type definition containing, wrapping the given property value. The given property value shall be of the same type as the underlying base type of the rename type definition, as returned by `getBaseType()`.

      Note that the value returned may contain a reference to the same internal value as the given property value and this data is not necessarily a new copy.

      Parameters:
        `propertyValue` - Property value of the base type to create a new property value of this rename type from.
      Returns:
        New property value created from the given property value of this type.
      Throws:
        `NullPointerException` - The given property value is `null`.
        `IllegalPropertyValueException` - The given property value is not compatible with the base type of this rename type definition.

    - #### clone

          TypeDefinitionRename clone()

      Create a cloned copy of this rename type definition.

      Specified by:
        `clone` in interface `MetaDefinition`
      Specified by:
        `clone` in interface `TypeDefinition`
      Returns:
        Cloned copy of this rename type definition.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.