org.netbeans.modules.refactoring.api 1.26.0 1

org.netbeans.modules.refactoring.api
Class SingleCopyRefactoring

java.lang.Object
  extended by org.netbeans.modules.refactoring.api.AbstractRefactoring
      extended by org.netbeans.modules.refactoring.api.SingleCopyRefactoring

public final class SingleCopyRefactoring
extends AbstractRefactoring

This class is just holder for parameters of Single Copy Refactoring. Refactoring itself is implemented in plugins

See Also:
RefactoringPlugin, RefactoringPluginFactory, AbstractRefactoring, RefactoringSession

Field Summary
 
Fields inherited from class org.netbeans.modules.refactoring.api.AbstractRefactoring
INIT, PARAMETERS_CHECK, PRE_CHECK, PREPARE
 
Constructor Summary
SingleCopyRefactoring(Lookup objectToCopy)
          Creates a new instance of SingleCopyRefactoring.
 
Method Summary
 String getNewName()
          getter for new name of copied file
 Lookup getTarget()
          Target for copying
 void setNewName(String newName)
          setter for new name of copied file
 void setTarget(Lookup target)
          Target for copying.
 
Methods inherited from class org.netbeans.modules.refactoring.api.AbstractRefactoring
addProgressListener, cancelRequest, checkParameters, fastCheckParameters, getContext, getRefactoringSource, preCheck, prepare, removeProgressListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleCopyRefactoring

public SingleCopyRefactoring(@NonNull
                             Lookup objectToCopy)
Creates a new instance of SingleCopyRefactoring. Single Copy Refactoring implementations currently understand following types:
ModuleTypes the Module UnderstandsImplementation
Refactoring API (Default impl.)FileObjectDoes file copy
Java Refactoring
  • FileObject(s) with content type text/x-java (class copy)
Updates name, package declaration and import statements

Parameters:
objectToCopy - Object to be copied stored into Lookup
Method Detail

setTarget

public void setTarget(@NonNull
                      Lookup target)
Target for copying. Single Copy Refactoring implementations currently understand following types:
ModuleTypes the Module UnderstandsImplementation
Refactoring API (Default impl.)URL Creates directory corresponding to specified URL (if does not exist) and copies all FileObjects into this folder.
Java RefactoringURLUpdates name, package declaration and import statements

Parameters:
target -

getTarget

@CheckForNull
public Lookup getTarget()
Target for copying

Returns:
target
See Also:
setTarget(org.openide.util.Lookup)

getNewName

@CheckForNull
public String getNewName()
getter for new name of copied file

Returns:
value String value

setNewName

public void setNewName(@NonNull
                       String newName)
setter for new name of copied file

Parameters:
newName - new value

org.netbeans.modules.refactoring.api 1.26.0 1

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.