public class UsageFinder
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
private static class |
UsageFinder.UsageVisitor |
Visitor to accumulate usage of definitions.
|
Modifier and Type | Field | Description |
---|---|---|
private UsageFinder.UsageVisitor |
m_visitor |
Visitor used for finding references.
|
private static Logger |
s_logger |
Logger for class.
|
Constructor | Description |
---|---|
UsageFinder() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addReferenceClosure(java.util.List list) |
Add usage counts for the reference closure of a supplied list of components.
|
void |
addReferenceClosure(AnnotatedBase comp) |
Add usage counts for the reference closure of a definition.
|
void |
countSchemaTree(SchemaElement schema) |
Add usage counts for a schema tree.
|
java.util.Set |
getNonSingletonSet() |
Get the set of definitions referenced as optional or repeating.
|
ReferenceCountMap |
getUsageMap() |
Get map of reference counts per component.
|
void |
reset() |
Clear the accumulated usage counts.
|
void |
setNameRegister(NameRegister reg) |
Set the register to be used for resolving name references.
|
private static final Logger s_logger
private final UsageFinder.UsageVisitor m_visitor
public ReferenceCountMap getUsageMap()
public java.util.Set getNonSingletonSet()
public void countSchemaTree(SchemaElement schema)
schema
- public void addReferenceClosure(AnnotatedBase comp)
comp
- definition to be processedpublic void addReferenceClosure(java.util.List list)
list
- starting schema componentspublic void setNameRegister(NameRegister reg)
countSchemaTree(SchemaElement)
, which always sets the register associated with the
supplied schema.reg
- public void reset()