## org.eclipse.emf.mint.util
Class ItemJavaElementDescriptor

    java.lang.Object
      org.eclipse.emf.mint.util.ItemJavaElementDescriptor

All Implemented Interfaces:
  IItemJavaElementDescriptor

    public class ItemJavaElementDescriptor

extends java.lang.Object
implements IItemJavaElementDescriptor

Default implementation of `IItemJavaElementDescriptor`.

Clients may extend or instantiate this class.

Constructor Summary
`protected` `ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaElement javaElement, IJavaTypeReference javaTypeReference, java.lang.String category, java.lang.String description, java.lang.String displayName, java.lang.Object feature)` Convenience constructor for setting all encapsulated fields in one place.
`` `ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaElement javaElement, java.lang.String category, java.lang.String description, java.lang.String displayName, java.lang.Object feature)` Creates an instance with a specific Java element.
`` `ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaProject context, java.lang.String typeName, java.lang.String category, java.lang.String description, java.lang.String displayName, java.lang.Object feature)` Creates an instance with an unresolved reference to a Java type in the context of a project.

Method Summary
`boolean` `equals(java.lang.Object obj)`
`java.lang.String` `getCategory(java.lang.Object object)` Returns an optional category used for grouping descriptors.
`java.lang.String` `getDescription(java.lang.Object object)` Returns an optional description of the Java code facet that this descriptor represents.
`java.lang.String` `getDisplayName(java.lang.Object object)` Returns a display name for the Java element that this descriptor represents for the given model element.
`java.lang.Object` `getFeature(java.lang.Object object)` Returns an optional related feature that this descriptor represents.
`org.eclipse.jdt.core.IJavaElement` `getJavaElement(java.lang.Object object)` Returns a specific Java element for the given model element, which may be `null`.
`IJavaTypeReference` `getJavaTypeReference(java.lang.Object object)` Returns an unresolved Java element reference for the given model element.
`int` `hashCode()`
`java.lang.String` `toString()`

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

Constructor Detail

### ItemJavaElementDescriptor

    public ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaElement javaElement,
                                     java.lang.String category,
                                     java.lang.String description,
                                     java.lang.String displayName,
                                     java.lang.Object feature)

  Creates an instance with a specific Java element. All other arguments are optional.

  Parameters:
    `javaElement` - the described Java element
    `category` - category used to group descriptors
    `description` - description
    `displayName` - display name
    `feature` - related feature, if any

### ItemJavaElementDescriptor

    public ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaProject context,
                                     java.lang.String typeName,
                                     java.lang.String category,
                                     java.lang.String description,
                                     java.lang.String displayName,
                                     java.lang.Object feature)

  Creates an instance with an unresolved reference to a Java type in the context of a project. All other arguments are optional.

  Parameters:
    `context` - Java project in whose context the type should be resolvable
    `typeName` - name of the referenced Java type
    `category` - category used to group descriptors
    `description` - description
    `displayName` - display name
    `feature` - related feature, if any

### ItemJavaElementDescriptor

    protected ItemJavaElementDescriptor(org.eclipse.jdt.core.IJavaElement javaElement,
                                        IJavaTypeReference javaTypeReference,
                                        java.lang.String category,
                                        java.lang.String description,
                                        java.lang.String displayName,
                                        java.lang.Object feature)

  Convenience constructor for setting all encapsulated fields in one place.

  Parameters:
    `javaElement` - java element (either the element or the reference are required)
    `javaTypeReference` - java type reference (either the reference or the element are required)
    `category` - category
    `description` - description
    `displayName` - display name
    `feature` - related feature, if any

Method Detail

### getJavaElement

    public org.eclipse.jdt.core.IJavaElement getJavaElement(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns a specific Java element for the given model element, which may be `null`.

  Specified by:
    `getJavaElement` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    Java element for the given model element, or `null` if none

### getJavaTypeReference

    public IJavaTypeReference getJavaTypeReference(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns an unresolved Java element reference for the given model element. Returns `null` if a specific Java element is available.

  Specified by:
    `getJavaTypeReference` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    Java element reference, or `null` if none

### getCategory

    public java.lang.String getCategory(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns an optional category used for grouping descriptors.

  Specified by:
    `getCategory` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    category used for grouping descriptors (may be `null`)

### getDescription

    public java.lang.String getDescription(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns an optional description of the Java code facet that this descriptor represents.

  Specified by:
    `getDescription` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    Java element description (i.e., how it relates to the model element)F

### getDisplayName

    public java.lang.String getDisplayName(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns a display name for the Java element that this descriptor represents for the given model element.

  Specified by:
    `getDisplayName` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    Java element's display name (i.e., what it represents for the given model element)

### getFeature

    public java.lang.Object getFeature(java.lang.Object object)

  Description copied from interface: `IItemJavaElementDescriptor`
  Returns an optional related feature that this descriptor represents.

  Specified by:
    `getFeature` in interface `IItemJavaElementDescriptor`
  Parameters:
    `object` - model element
  Returns:
    feature related to this descriptor (may be `null`)

### equals

    public boolean equals(java.lang.Object obj)

  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`

Copyright 2008 Ecliptical Software Inc. and others. All Rights Reserved.