public class RunnableInheritAnnotationsManager
extends java.lang.Object
implements java.lang.Runnable
InheritAnnotationsManager
in a separated thread
with progress reporting.
Initialize this class with a session control, a list
of Annotatable
items and a list of
InheritSpecification
:s, then start a new
thread: new Thread(manager).start();
Modifier and Type | Field and Description |
---|---|
private java.util.List<Annotatable> |
items |
private ProgressReporter |
progress |
private SessionControl |
sc |
private java.util.List<InheritSpecification> |
specifications |
Constructor and Description |
---|
RunnableInheritAnnotationsManager(SessionControl sc)
Create a new instance that should use the given session
control.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllItems(java.util.Collection<? extends Annotatable> items)
Add all items for processing.
|
void |
addItem(Annotatable item)
Add an item that should inherit annotations.
|
void |
addSpecification(InheritSpecification specification)
Add a specification with rules for inheriting annotations.
|
void |
run() |
void |
setProgressReporter(ProgressReporter progress)
Set the progress reporter to use for reporting progress.
|
private final SessionControl sc
private ProgressReporter progress
private final java.util.List<InheritSpecification> specifications
private final java.util.List<Annotatable> items
public RunnableInheritAnnotationsManager(SessionControl sc)
public void setProgressReporter(ProgressReporter progress)
public void addSpecification(InheritSpecification specification)
public void addItem(Annotatable item)
InheritAnnotationsManager.process(Annotatable)
once the thread is stared.public void addAllItems(java.util.Collection<? extends Annotatable> items)
public void run()
run
in interface java.lang.Runnable