Eclipse Platform
Release 3.1

org.eclipse.ltk.core.refactoring
Class RefactoringDescriptor

java.lang.Object
  extended byorg.eclipse.ltk.core.refactoring.RefactoringDescriptor
All Implemented Interfaces:
Comparable

public class RefactoringDescriptor
extends Object
implements Comparable

Descriptor object of a refactoring.

A refactoring descriptor contains refactoring-specific data which allows to framework to completely reconstruct a particular refactoring instance and execute it on the workspace. Refactoring descriptors are identified by their refactoring id getID() and their time stamps getTimeStamp().

Refactoring descriptors are potentially heavyweight objects which should not be held on to. Use refactoring descriptor handles RefactoringDescriptorProxy to store refactoring information.

Note: this class is not indented to be subclassed outside the refactoring framework.

Note: This API is considered experimental and may change in the near future.

Since:
3.2

Constructor Summary
RefactoringDescriptor(String id, String project, String description, String comment, Map arguments)
          Creates a new refactoring descriptor.
 
Method Summary
 int compareTo(Object object)
          
 boolean equals(Object object)
          
 Map getArguments()
          Returns the arguments describing the refactoring, in no particular order.
 String getComment()
          Returns the comment associated with this refactoring.
 String getDescription()
          Returns a human-readable description of the particular refactoring instance.
 String getID()
          Returns the unique id of the refactoring.
 String getProject()
          Returns the name of the project this refactoring is associated with.
 long getTimeStamp()
          Returns the time stamp of this refactoring.
 int hashCode()
          
 boolean isUnknown()
          Returns whether this descriptor describes an unknown refactoring.
 void setTimeStamp(long stamp)
          Sets the time stamp of this refactoring.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RefactoringDescriptor

public RefactoringDescriptor(String id,
                             String project,
                             String description,
                             String comment,
                             Map arguments)
Creates a new refactoring descriptor.

Parameters:
id - the unique id of the refactoring
project - the non-empty name of the project associated with this refactoring, or null
description - a non-empty human-readable description of the particular refactoring instance
comment - the comment associated with the refactoring, or null for no commment
arguments - the argument map (element type: <String, String>). The keys of the arguments are required to be non-empty strings which must not contain spaces. The values must be non-empty strings
Method Detail

compareTo

public final int compareTo(Object object)

Specified by:
compareTo in interface Comparable

equals

public final boolean equals(Object object)


getArguments

public final Map getArguments()
Returns the arguments describing the refactoring, in no particular order.

Returns:
the argument map (element type: <String, String>). The resulting map cannot be modified.

getComment

public final String getComment()
Returns the comment associated with this refactoring.

Returns:
the associated comment, or the empty string

getDescription

public final String getDescription()
Returns a human-readable description of the particular refactoring instance.

Returns:
a description of the refactoring

getID

public final String getID()
Returns the unique id of the refactoring.

Returns:
the unique id

getProject

public final String getProject()
Returns the name of the project this refactoring is associated with.

Returns:
the non-empty name of the project, or null

getTimeStamp

public final long getTimeStamp()
Returns the time stamp of this refactoring.

Returns:
the time stamp, or -1 if no time information is available

hashCode

public final int hashCode()


isUnknown

public boolean isUnknown()
Returns whether this descriptor describes an unknown refactoring.

The default implementation returns false.

Returns:
true if the descriptor describes an unknown refactoring, false otherwise

setTimeStamp

public final void setTimeStamp(long stamp)
Sets the time stamp of this refactoring.

Note: This API must not be called from outside the refactoring framework.

Parameters:
stamp - the time stamp to set

toString

public final String toString()


Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.