Package org.geotools.xsd.impl
Class BindingLoader
- Object
-
- BindingLoader
-
public class BindingLoader extends Object
Stores a list of binding classes and provides ways to load or get a specificBinding
object based onQName
. It can handle storage of classes that support theComponentAdapter
interface or other classes but will attempt to instantiate and return aBinding
object.It uses a Context (otherwise known as PicoContainer) to instantiate the relevant object and understand the dependencies that should also be loaded. The Context is required to be passed in by the caller
-
-
Constructor Summary
Constructors Constructor Description BindingLoader(Map<QName,Object> bindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ComponentAdapter
getBinding(QName type)
Returns the component adapter for a binding with the specified name.Binding
loadBinding(QName qName, Class bindingClass, PicoContainer context)
Loads a binding with a specific class into a context.Binding
loadBinding(QName qName, PicoContainer context)
Loads a binding with a specific QName into a context.
-
-
-
Method Detail
-
loadBinding
public Binding loadBinding(QName qName, PicoContainer context)
Loads a binding with a specific QName into a context.- Parameters:
qName
- The qualified name of the type of the binding object.context
- The context which is to contain the binding.- Returns:
- The binding object of the associated type, otherwise null if no such binding could be created.
-
loadBinding
public Binding loadBinding(QName qName, Class bindingClass, PicoContainer context)
Loads a binding with a specific class into a context.- Parameters:
bindingClass
- The class of the binding.context
- The context which is to contain the binding.- Returns:
- The binding object of the associated type, otherwise null if no such binding could be created.
-
getBinding
protected ComponentAdapter getBinding(QName type)
Returns the component adapter for a binding with the specified name.- Parameters:
type
- The qualified name of the type of the binding.- Returns:
- The binding class, or null if no such class exists.
-
-