站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

RefactoringElementsBag (Refactoring API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.refactoring.api 1.0

org.netbeans.modules.refactoring.spi
Class RefactoringElementsBag

java.lang.Object
  extended by org.netbeans.modules.refactoring.spi.RefactoringElementsBag

public final class RefactoringElementsBag
extends Object

Container holding RefactoringElements


Method Summary
 Problem add(AbstractRefactoring refactoring, RefactoringElementImplementation el)
          Adds RefactoringElementImplementation to this bag.
 Problem addAll(AbstractRefactoring refactoring, Collection<RefactoringElementImplementation> elements)
          Adds all RefactringElements from given Collection using #add method
 Problem addFileChange(AbstractRefactoring refactoring, RefactoringElementImplementation el)
          fileChanges are performed after all element changes
 RefactoringSession getSession()
           
 void registerTransaction(Transaction commit)
          commits are called after all changes are performed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public Problem add(AbstractRefactoring refactoring,
                   RefactoringElementImplementation el)
Adds RefactoringElementImplementation to this bag. If RefactoringElementImplementation is in read-only file - status of this element is changes to RefactoringElement.READ_ONLY If RefactoringElementImplementation is in guarded block, all registered GuardedBlockHandler are asked, if they can replace given RefactoringElementImplementation by it's own RefactoringElementImplementation. If there is no suitable replacement found, given element is added and it's status is set to RefactringElement.GUARDED

Parameters:
refactoring - refactoring, which adds this RefactoringElementImplementation
el - element to add
Returns:
instance of Problem or null

addAll

public Problem addAll(AbstractRefactoring refactoring,
                      Collection<RefactoringElementImplementation> elements)
Adds all RefactringElements from given Collection using #add method

Parameters:
refactoring - refactoring, which adds this RefactoringElement
elements - Collection of RefactoringElements
Returns:
instance of Problem or null

getSession

public RefactoringSession getSession()
Returns:
RefactoringSession associated with this RefactoringElementsBag

registerTransaction

public void registerTransaction(Transaction commit)
commits are called after all changes are performed

Parameters:
commit - Transaction to commit
See Also:
Transaction, BackupFacilty

addFileChange

public Problem addFileChange(AbstractRefactoring refactoring,
                             RefactoringElementImplementation el)
fileChanges are performed after all element changes

Parameters:
changes - changes to be performed
See Also:
Transaction, BackupFacilty

org.netbeans.modules.refactoring.api 1.0

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.