alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
 * Microsystems, Inc. All Rights Reserved.
 */
package org.netbeans.modules.refactoring.api;

import org.netbeans.jmi.javamodel.Element;
import org.openide.text.PositionBounds;

/** Interface representing a refactoring element (object affected by a refactoring)
 * returned in a collection from {@link org.netbeans.modules.refactoring.api.AbstractRefactoring#prepare} operation.
 * 

* [PENDING] should go to spi package? * * @author Martin Matula */ public interface RefactoringElement { /** Status corresponding to a normal element */ int NORMAL = 0; /** Status corresponding to an element that has a warning associated with it */ int WARNING = 1; /** Status flag that indicates that the element cannot be enabled (if a fatal * problem is associated with it) */ int GUARDED = 2; /** Returns text describing the refactoring element. * @return Text. */ String getText(); /** Returns text describing the refactoring formatted for display (using HTML tags). * @return Formatted text. */ String getDisplayText(); /** Indicates whether this refactoring element is enabled. * @return true if this element is enabled, otherwise false. */ boolean isEnabled(); /** Enables/disables this element. * @param enabled If true the element is enabled, otherwise it is disabled. */ void setEnabled(boolean enabled); /** Performs the change represented by this refactoring element. */ void performChange(); /** Returns Java element associated with this refactoring element. * @return MDR Java element. */ Element getJavaElement(); /** Returns position bounds of the text to be affected by this refactoring element. */ PositionBounds getPosition(); /** Returns the status of this refactoring element (whether it is a normal element, * or a warning. * @return Status of this element. */ int getStatus(); }

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.