public class ClassHierarchyContext
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private java.util.HashSet |
m_compatibleTypeSet |
Set of compatible type names.
|
private java.util.HashMap |
m_nameToComponentMap |
Map from format names to
String conversions (lazy create). |
private ClassHierarchyContext |
m_outerContext |
Link to containing context.
|
private java.util.HashMap |
m_typeToComponentMap |
Map from type name to binding component.
|
Modifier | Constructor | Description |
---|---|---|
protected |
ClassHierarchyContext(ClassHierarchyContext outer) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
private void |
accumulateInterfaces(IClass clas,
java.util.Set intfset) |
Accumulate all the interfaces implemented (both directly and indirectly)
by a class.
|
void |
addNamedComponent(java.lang.String label,
ElementBase comp,
ValidationContext vctx) |
Add named component to set defined at this level.
|
void |
addTypedComponent(IClass clas,
ElementBase comp,
ValidationContext vctx) |
Add typed component to set defined at this level.
|
ClassHierarchyContext |
getContaining() |
Get containing context.
|
ElementBase |
getMostSpecificComponent(IClass clas) |
Get best binding component for class.
|
ElementBase |
getNamedComponent(java.lang.String name) |
Get named binding component definition.
|
ElementBase |
getSpecificComponent(java.lang.String name) |
Get specific binding component for type.
|
boolean |
isCompatibleType(IClass clas) |
Checks if a class is compatible with one or more components.
|
private final ClassHierarchyContext m_outerContext
private java.util.HashMap m_typeToComponentMap
private java.util.HashSet m_compatibleTypeSet
private java.util.HashMap m_nameToComponentMap
String
conversions (lazy create).protected ClassHierarchyContext(ClassHierarchyContext outer)
outer
- containing context (null
if at root of tree)public ClassHierarchyContext getContaining()
null
if at root of
tree)private void accumulateInterfaces(IClass clas, java.util.Set intfset)
clas
- intfset
- set of interfacespublic void addTypedComponent(IClass clas, ElementBase comp, ValidationContext vctx)
clas
- class information to be associated with componentcomp
- definition component to be addedvctx
- validation context in usepublic void addNamedComponent(java.lang.String label, ElementBase comp, ValidationContext vctx)
label
- name to be associated with componentcomp
- definition component to be addedvctx
- validation context in usepublic ElementBase getSpecificComponent(java.lang.String name)
name
- fully qualified class name to be convertednull
if not
foundpublic ElementBase getNamedComponent(java.lang.String name)
name
- component name to be foundnull
if not
foundpublic ElementBase getMostSpecificComponent(IClass clas)
clas
- information for target classnull
if
none foundpublic boolean isCompatibleType(IClass clas)
clas
- information for target classtrue
if compatible type, false
if not