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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the field nameintgetType()Gets the type as a number.StringgetVerboseSignature()Returns the type of the field.voidsetName(String name)Sets the name of the field.voidsetType(int type)Sets the type of the field.StringtoString()A readable representation of the field descriptor.
-
-
-
Constructor Detail
-
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 nametype- field type fromIObject.Type
-
-
Method Detail
-
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 asIObject.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
-
-