org.netbeans.modules.refactoring.java/1 1.37.0 1

org.netbeans.modules.refactoring.java.api
Class ExtractInterfaceRefactoring

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

public final class ExtractInterfaceRefactoring
extends AbstractRefactoring

Extract Interface Refactoring.

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
ExtractInterfaceRefactoring(TreePathHandle sourceType)
          Creates a new instance of ExtractInterfaceRefactoring
 
Method Summary
 List<ElementHandle<VariableElement>> getFields()
          Gets fields to extract.
 List<TypeMirrorHandle<TypeMirror>> getImplements()
          Gets interfaces to extract.
 String getInterfaceName()
          Returns name of the interface to be created.
 List<ElementHandle<ExecutableElement>> getMethods()
          Gets methods to extract.
 TreePathHandle getSourceType()
          Returns the type the members of which should be extracted into an interface by this refactoring.
 void setFields(List<ElementHandle<VariableElement>> fields)
          Sets public static final fields with default value to extract.
 void setImplements(List<TypeMirrorHandle<TypeMirror>> implementz)
          Sets interfaces to extract.
 void setInterfaceName(String ifcName)
          Sets the name of the interface to be created.
 void setMethods(List<ElementHandle<ExecutableElement>> methods)
          Sets public methods to extract.
 
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

ExtractInterfaceRefactoring

public ExtractInterfaceRefactoring(TreePathHandle sourceType)
Creates a new instance of ExtractInterfaceRefactoring

Parameters:
sourceType - Type the members of which should be extracted into an interface.
Method Detail

getSourceType

public TreePathHandle getSourceType()
Returns the type the members of which should be extracted into an interface by this refactoring.

Returns:
Source of the members to be extracted.

getInterfaceName

public String getInterfaceName()
Returns name of the interface to be created.

Returns:
Name of the new interface or null if it is not set.

setInterfaceName

public void setInterfaceName(String ifcName)
Sets the name of the interface to be created.

Parameters:
ifcName - Name of the new interface.

getMethods

public List<ElementHandle<ExecutableElement>> getMethods()
Gets methods to extract.

Returns:
list of methods

setMethods

public void setMethods(List<ElementHandle<ExecutableElement>> methods)
Sets public methods to extract.

Parameters:
methods - list of methods

getFields

public List<ElementHandle<VariableElement>> getFields()
Gets fields to extract.

Returns:
list of fields

setFields

public void setFields(List<ElementHandle<VariableElement>> fields)
Sets public static final fields with default value to extract.

Parameters:
fields - list of fields

getImplements

public List<TypeMirrorHandle<TypeMirror>> getImplements()
Gets interfaces to extract.

Returns:
list of interfaces

setImplements

public void setImplements(List<TypeMirrorHandle<TypeMirror>> implementz)
Sets interfaces to extract.

Parameters:
implementz - list of interfaces

org.netbeans.modules.refactoring.java/1 1.37.0 1

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