Package org.eclipse.emf.cdo.common.model

# Enum Class CDOPackageUnit.Type

java.lang.Object
java.lang.Enum<CDOPackageUnit.Type>
org.eclipse.emf.cdo.common.model.CDOPackageUnit.Type

All Implemented Interfaces:
  `Serializable`, `Comparable<CDOPackageUnit.Type>`, `Constable`

Enclosing interface:
  `CDOPackageUnit`

public static enum CDOPackageUnit.Type extends Enum<CDOPackageUnit.Type>
Describes the `instances` of `classes` of a `package unit`.

Author:
  Eike Stepper

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`DYNAMIC`
The type of models that are not generated at all but rather dynamically constructed at runtime.
`LEGACY`
The type of models that are not generated specifically for the usage with CDO.
`NATIVE`
The type of models that are generated specifically for the usage with CDO.
`UNKNOWN`
Used to indicate that the type of a model could not be determined.

## Method Summary

Modifier and Type
Method
Description
`void`
`checkNotUnknown()`
`boolean`
`isGenerated()`
Returns `true` if this type is either `NATIVE` or `LEGACY`, `false` otherwise.
`static CDOPackageUnit.Type`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static CDOPackageUnit.Type[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

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

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

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

## Enum Constant Details

### NATIVE

public static final CDOPackageUnit.Type NATIVE
The type of models that are generated specifically for the usage with CDO. `Instances` of `classes` of these models can be directly cast to `CDOObject`.

### LEGACY

public static final CDOPackageUnit.Type LEGACY
The type of models that are not generated specifically for the usage with CDO. `Instances` of `classes` of these models can not be directly cast to `CDOObject`. The static utility method `CDOUtil.getCDOObject(eObject)` can be used to obtain a `CDOObject`.

### DYNAMIC

public static final CDOPackageUnit.Type DYNAMIC
The type of models that are not generated at all but rather dynamically constructed at runtime. `Instances` of `classes` of these models can be directly cast to `CDOObject`, i.e. they're implicitly `NATIVE`.

### UNKNOWN

public static final CDOPackageUnit.Type UNKNOWN
Used to indicate that the type of a model could not be determined. Refer to the `package type registry` on how to deal with this scenario.

## Method Details

### values

public static CDOPackageUnit.Type[] 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 CDOPackageUnit.Type 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

### isGenerated

public boolean isGenerated()
Returns `true` if this type is either `NATIVE` or `LEGACY`, `false` otherwise.

### checkNotUnknown

public void checkNotUnknown() throws IllegalStateException

Throws:
  `IllegalStateException` - if this type is `UNKNOWN`.