Runtime

## org.eclipse.gmf.runtime.emf.type.core
Class SpecializationType

    java.lang.Object
      org.eclipse.gmf.runtime.emf.type.core.ElementType
          org.eclipse.gmf.runtime.emf.type.core.SpecializationType

All Implemented Interfaces:
  IAdaptable, IElementType, ISpecializationType

public class SpecializationType
extends ElementType
implements ISpecializationType

Represents an application type that specializes other application types.

Specializations can contribute 'before' and 'after' advice to the editing commands associated with the application types that they specialize.

Constructor Summary
`SpecializationType(ISpecializationTypeDescriptor descriptor)` Constructs a new instance using values from the type descriptor.
`SpecializationType(java.lang.String id, java.net.URL iconURL, java.lang.String displayName, IElementType[] elementTypes, IElementMatcher matcher, IContainerDescriptor descriptor, IEditHelperAdvice editHelperAdvice)` Constructs a new specialization type.

Method Summary
`IElementType[]` `getAllSuperTypes()` Gets the element supertypes for this type.
`EClass` `getEClass()` Gets the metaclass that is specialized by this type.
`IContainerDescriptor` `getEContainerDescriptor()` Gets the container descriptor.
`ICommand` `getEditCommand(IEditCommandRequest request)` Gets a command to edit an element of this type.
`IEditHelper` `getEditHelper()` Gets the edit helper for this element type.
`IEditHelperAdvice` `getEditHelperAdvice()` Gets my edit helper advice.
`IElementMatcher` `getMatcher()` Gets the element matcher.
`IMetamodelType` `getMetamodelType()` Gets the metamodel type that this type is a specialization of.
`java.lang.String[]` `getSpecializedTypeIds()` Gets the IDs of the specialized types.
`IElementType[]` `getSpecializedTypes()` Gets the element types that this type specializes.
`boolean` `isSpecializationOf(IElementType type)` Answers whether or not I am a specialization of `type`.
`java.lang.String` `toString()`

Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.ElementType
`canEdit, getAdapter, getDisplayName, getIconURL, getId, setAllSupertypes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.emf.type.core.IElementType
`canEdit, getDisplayName, getIconURL, getId`

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Constructor Detail

### SpecializationType

    public SpecializationType(java.lang.String id,
                              java.net.URL iconURL,
                              java.lang.String displayName,
                              IElementType[] elementTypes,
                              IElementMatcher matcher,
                              IContainerDescriptor descriptor,
                              IEditHelperAdvice editHelperAdvice)

  Constructs a new specialization type.

Parameters:
  `id` - the type id
  `iconURL` - the URL for the icon
  `displayName` - the display name
  `elementTypes` - the element types that are specialized by this type
  `matcher` - the element matcher
  `descriptor` - the container descriptor
  `editHelperAdvice` - the edit helper advice

### SpecializationType

    public SpecializationType(ISpecializationTypeDescriptor descriptor)

  Constructs a new instance using values from the type descriptor.

Parameters:
  `descriptor` - the specialization type descriptor

Method Detail

### getEContainerDescriptor

    public IContainerDescriptor getEContainerDescriptor()

  Gets the container descriptor.

  Specified by:
    `getEContainerDescriptor` in interface `ISpecializationType`
  Returns:
    the container descriptor.

### getMatcher

    public IElementMatcher getMatcher()

  Gets the element matcher.

  Specified by:
    `getMatcher` in interface `ISpecializationType`
  Returns:
    the element matcher.

### getSpecializedTypes

    public IElementType[] getSpecializedTypes()

  Gets the element types that this type specializes.

  Specified by:
    `getSpecializedTypes` in interface `ISpecializationType`
  Returns:
    an array of types that are specialized by this type.

### getSpecializedTypeIds

    public java.lang.String[] getSpecializedTypeIds()

  Gets the IDs of the specialized types.

  Specified by:
    `getSpecializedTypeIds` in interface `ISpecializationType`
  Returns:
    the IDs of the specialized types

### isSpecializationOf

    public boolean isSpecializationOf(IElementType type)

  Answers whether or not I am a specialization of `type`.

  Specified by:
    `isSpecializationOf` in interface `ISpecializationType`
  Parameters:
    `type` - the type to be tested
  Returns:
    `true` if I am a specialization of `type`, `false` otherwise.

### getEditHelperAdvice

    public IEditHelperAdvice getEditHelperAdvice()

  Gets my edit helper advice. The advice can return 'before' or 'after' editing commands for editing elements of the types that I specialize.

  Specified by:
    `getEditHelperAdvice` in interface `ISpecializationType`
  Returns:
    the edit helper advice.

### getEClass

    public EClass getEClass()

  Gets the metaclass that is specialized by this type.

  Specified by:
    `getEClass` in interface `IElementType`
  Overrides:
    `getEClass` in class `ElementType`
  Returns:
    the metaclass

### getMetamodelType

    public IMetamodelType getMetamodelType()

  Description copied from interface: `ISpecializationType`
  Gets the metamodel type that this type is a specialization of. This type may be a direct specialization of the metamodel type, or indirect through other specializations. It can specialize any number of other specializations, so long as they in turn all specialize the same metamodel type.

  Specified by:
    `getMetamodelType` in interface `ISpecializationType`
  Returns:
    the metamodel type that I specialize

### getEditHelper

    public IEditHelper getEditHelper()

  Description copied from interface: `IElementType`
  Gets the edit helper for this element type.

  Specified by:
    `getEditHelper` in interface `IElementType`
  Returns:
    the edit helper

### getEditCommand

    public ICommand getEditCommand(IEditCommandRequest request)

  Description copied from interface: `IElementType`
  Gets a command to edit an element of this type.

  Specified by:
    `getEditCommand` in interface `IElementType`
  Overrides:
    `getEditCommand` in class `ElementType`

### getAllSuperTypes

    public IElementType[] getAllSuperTypes()

  Description copied from interface: `IElementType`
  Gets the element supertypes for this type. Ordered from furthest supertype to nearest supertype.

  Specified by:
    `getAllSuperTypes` in interface `IElementType`
  Overrides:
    `getAllSuperTypes` in class `ElementType`

### toString

    public java.lang.String toString()

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.