public class

FileListScanner

extends Object
implements Scanner
java.lang.Object
   ↳ com.atlassian.plugin.loaders.FileListScanner

Class Overview

A scanner that simply scans a given set of input files. This scanner will always return the units in the order supplied in the constructor.

Summary

Public Constructors
FileListScanner(Collection<File> files)
Public Methods
Collection<DeploymentUnit> getDeploymentUnits()
Gets all deployment units currently being tracked by the scanner.
void remove(DeploymentUnit unit)
Remove the specified deployment unit in such a way as it will not be picked up by subsequent scans, even if the system is restarted.
void reset()
Reset the scanner.
Collection<DeploymentUnit> scan()
Scan for new deployment units.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.loaders.classloading.Scanner

Public Constructors

public FileListScanner (Collection<File> files)

Public Methods

public Collection<DeploymentUnit> getDeploymentUnits ()

Gets all deployment units currently being tracked by the scanner. This will not trigger a scan, meaning that plugins that have been added since the last scan will not be returned.

Returns
  • a collection of all deployment units currently being tracked by the scanner.

public void remove (DeploymentUnit unit)

Remove the specified deployment unit in such a way as it will not be picked up by subsequent scans, even if the system is restarted.

Parameters
unit the deployment unit to remove

public void reset ()

Reset the scanner. This causes it to forget all state about which plugins have (or haven't) been loaded.

public Collection<DeploymentUnit> scan ()

Scan for new deployment units. On the first scan, all deployment units that the scanner can find will be returned. Subsequent scans will only return deployment units that are new since the last scan (or call to reset() or clear())

Returns
  • all new deployment units since the last scan