org.ungoverned.moduleloader.search.selection
Class InteractiveSelectionPolicy
java.lang.Object
org.ungoverned.moduleloader.search.selection.InteractiveSelectionPolicy
- All Implemented Interfaces:
- SelectionPolicy
public class InteractiveSelectionPolicy
- extends java.lang.Object
- implements SelectionPolicy
This class implements an interactive selection policy for the
ImportSearchPolicy. This policy simply uses standard
output to present the list of candidate modules and uses standard
input to allow the user to select a specific module from the
candidates. This selection policy is generally only useful for
debugging purposes.
- See Also:
SelectionPolicy
,
ImportSearchPolicy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InteractiveSelectionPolicy
public InteractiveSelectionPolicy()
select
public Module select(Module module,
java.lang.Object target,
java.lang.Object version,
Module[] candidates,
CompatibilityPolicy compatPolicy)
- Returns a single package from an array of packages.
- Specified by:
select
in interface SelectionPolicy
- Parameters:
sources
- array of packages from which to choose.
- Returns:
- the selected package or null if no package
can be selected.