public class UsageFinder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
UsageFinder.UsageVisitor
Visitor to accumulate usage of definitions.
|
Modifier and Type | Field and Description |
---|---|
private UsageFinder.UsageVisitor |
m_visitor
Visitor used for finding references.
|
private static org.apache.log4j.Logger |
s_logger
Logger for class.
|
Constructor and Description |
---|
UsageFinder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferenceClosure(AnnotatedBase comp)
Add usage counts for the reference closure of a definition.
|
void |
addReferenceClosure(java.util.List list)
Add usage counts for the reference closure of a supplied list of components.
|
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 org.apache.log4j.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()