|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.model.ClassHierarchyContext
public class ClassHierarchyContext
Context for components using a hierarchy of definitions based on class type. This is used to track conversion definitions in the form of format and template elements. The access methods take the different levels of nesting into account, automatically delegating to the containing context (if defined) when a lookup fails.
| Constructor Summary | |
|---|---|
protected |
ClassHierarchyContext(ClassHierarchyContext outer)
Constructor. |
| Method Summary | |
|---|---|
void |
addNamedComponent(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(String name)
Get named binding component definition. |
ElementBase |
getSpecificComponent(String name)
Get specific binding component for type. |
boolean |
isCompatibleType(IClass clas)
Checks if a class is compatible with one or more components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ClassHierarchyContext(ClassHierarchyContext outer)
outer - containing context (null if at root of tree)| Method Detail |
|---|
public ClassHierarchyContext getContaining()
null if at root of
tree)
public void addTypedComponent(IClass clas,
ElementBase comp,
ValidationContext vctx)
clas - class information to be associated with componentcomp - definition component to be addedvctx - validation context in use
public void addNamedComponent(String label,
ElementBase comp,
ValidationContext vctx)
label - name to be associated with componentcomp - definition component to be addedvctx - validation context in usepublic ElementBase getSpecificComponent(String name)
name - fully qualified class name to be converted
null if not
foundpublic ElementBase getNamedComponent(String name)
name - component name to be found
null if not
foundpublic ElementBase getMostSpecificComponent(IClass clas)
clas - information for target class
null if
none foundpublic boolean isCompatibleType(IClass clas)
clas - information for target class
true if compatible type, false if not
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||