org.netbeans.modules.refactoring.api
Class Context
java.lang.Object
org.openide.util.Lookup
org.netbeans.modules.refactoring.api.Context
public final class Context
- extends Lookup
Context contains "environment" in which the refactoring was invoked.
For example, Java refactoring might put instance of ClasspathInfo here
The context acts as a Map<Class,Object> keyed off the concrete
implementation class of the "values".
- See Also:
AbstractRefactoring
| Fields inherited from class org.openide.util.Lookup |
EMPTY |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
add
public void add(@NonNull
Object value)
- Adds value instance into this context.
For example, Java impl. puts instance of ClasspathInfo here.
If there is an instance already set for this context, old
value is replaced by new one.
- Parameters:
value - the instance the add
remove
public void remove(@NonNull
Class<?> clazz)
- Removes instance from this context.
- Parameters:
clazz - the class to remove the instance of- Since:
- 1.24
lookup
public <T> T lookup(Class<T> clazz)
- Specified by:
lookup in class Lookup
lookup
public <T> Lookup.Result<T> lookup(Lookup.Template<T> template)
- Specified by:
lookup in class Lookup