org.simantics.databoard.bindingscheme
Class BindingRepository

java.lang.Object
  extended by org.simantics.databoard.bindingscheme.BindingRepository
All Implemented Interfaces:
BindingScheme

public class BindingRepository
extends java.lang.Object
implements BindingScheme

Binding Repository stores datatype to binding mappings. It does not allow

Author:
Toni Kalajainen

Constructor Summary
BindingRepository()
           
 
Method Summary
 void add(Binding binding)
          Add a binding.
 void add(java.lang.Class<?> clazz)
           
 Binding getBinding(DataType type)
          Get binding of a data type
 boolean supportsType(DataType type)
          Tests if the scheme supports a type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingRepository

public BindingRepository()
Method Detail

getBinding

public Binding getBinding(DataType type)
Description copied from interface: BindingScheme
Get binding of a data type

Specified by:
getBinding in interface BindingScheme
Parameters:
type - data type
Returns:
binding

supportsType

public boolean supportsType(DataType type)
Description copied from interface: BindingScheme
Tests if the scheme supports a type

Specified by:
supportsType in interface BindingScheme
Returns:
true if the type is with in the scheme

add

public void add(Binding binding)
Add a binding. If a binding for the data type already exists, the previous binding is removed.

Parameters:
binding -

add

public void add(java.lang.Class<?> clazz)
         throws BindingConstructionException
Throws:
BindingConstructionException