| java.lang.Object org.jibx.binding.model.ClassHierarchyContext
ClassHierarchyContext | public class ClassHierarchyContext (Code) | | 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.
author: Dennis M. Sosnoski |
ClassHierarchyContext | protected ClassHierarchyContext(ClassHierarchyContext outer)(Code) | | Constructor.
Parameters: outer - containing context (null if at root of tree) |
addNamedComponent | public void addNamedComponent(String label, ElementBase comp, ValidationContext vctx)(Code) | | Add named component to set defined at this level. This associated the
component with the type for class hierarchy-based lookups.
TODO: Make this use qname instead of text
Parameters: label - name to be associated with component Parameters: comp - definition component to be added Parameters: vctx - validation context in use |
addTypedComponent | public void addTypedComponent(IClass clas, ElementBase comp, ValidationContext vctx)(Code) | | Add typed component to set defined at this level. This associated the
component with the type for class hierarchy-based lookups.
Parameters: clas - class information to be associated with component Parameters: comp - definition component to be added Parameters: vctx - validation context in use |
getContaining | public ClassHierarchyContext getContaining()(Code) | | Get containing context.
containing context information (null if at root oftree) |
getMostSpecificComponent | public ElementBase getMostSpecificComponent(IClass clas)(Code) | | Get best binding component for class. Finds the component based on a
fully qualified class name. If a specific component for the actual
class is not found (either in this or a containing level) this returns
the most specific superclass component.
Parameters: clas - information for target class binding component definition for class, or null ifnone found |
getNamedComponent | public ElementBase getNamedComponent(String name)(Code) | | Get named binding component definition. Finds the component with the
supplied name, checking the containing definitions if the component is
not found at this level.
Parameters: name - component name to be found binding component with name, or null if notfound |
getSpecificComponent | public ElementBase getSpecificComponent(String name)(Code) | | Get specific binding component for type. Finds with an exact match
on the type name, checking the containing definitions if a matching
component is not found at this level.
Parameters: name - fully qualified class name to be converted binding component for class, or null if notfound |
isCompatibleType | public boolean isCompatibleType(IClass clas)(Code) | | Checks if a class is compatible with one or more components. If a
specific component for the actual class is not found (either in this or a
containing level) this checks for components that handle subclasses or
implementations of the class.
Parameters: clas - information for target class true if compatible type, false if not |
|
|