Package org.eclipse.mat.snapshot.model

# Class FieldDescriptor

java.lang.Object
org.eclipse.mat.snapshot.model.FieldDescriptor

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `Field`

public class FieldDescriptor extends Object implements Serializable
Describes a field of an object, i.e. its name and signature.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`FieldDescriptor(String name, int type)`
Create a field for a class - just contains the field name and type, not the value

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
Gets the field name
`int`
`getType()`
Gets the type as a number.
`String`
`getVerboseSignature()`
Returns the type of the field.
`void`
`setName(String name)`
Sets the name of the field.
`void`
`setType(int type)`
Sets the type of the field.
`String`
`toString()`
A readable representation of the field descriptor.

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

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FieldDescriptor

public FieldDescriptor(String name, int type)
Create a field for a class - just contains the field name and type, not the value

Parameters:
  `name` - field name
  `type` - field type from `IObject.Type`

## Method Details

### getName

public String getName()
Gets the field name

Returns:
  the actual field name

### getType

public int getType()
Gets the type as a number.

Returns:
  as `IObject.Type`

### setName

public void setName(String name)
Sets the name of the field. Normally the name should not be changed.

Parameters:
  `name` - the name of the field.
No Reference:

### setType

public void setType(int type)
Sets the type of the field. Normally the type should not be changed.

Parameters:
  `type` - the type of the field as `IObject.Type`
No Reference:

### getVerboseSignature

public String getVerboseSignature()
Returns the type of the field. Used for example by the object inspector pane.

Returns:
  ref byte short int long boolean char float double

### toString

public String toString()
A readable representation of the field descriptor. Do not rely on the format of the result.

Overrides:
  `toString` in class `Object`
Returns:
  a description of this field descriptor.