1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.databoard.binding.reflection;
\r
14 import org.simantics.databoard.binding.Binding;
\r
15 import org.simantics.databoard.binding.error.BindingConstructionException;
\r
18 * Binding provider is an interface for providers that provide context-specific
\r
19 * or hand-written bindings for the whole binding construction mechanism.
\r
21 * @author toni.kalajainen@semantum.fi
\r
23 public interface BindingProvider {
\r
26 * Construct a binding for a request. This method returns null if a binding
\r
27 * cannot be provided by this factory. Exception is thrown if construction
\r
28 * is expected to success but fails for a reason.
\r
30 * If this class constructs a compositive type: Array, Map, Optional,
\r
31 * Record or Union, the composite types/fields need not be filled, and
\r
32 * should be left null. They are filled by the caller.
\r
35 * @param mainFactory master factory
\r
36 * @return binding or <code>null</code>
\r
37 * @throws BindingConstructionException
\r
39 Binding provideBinding(ClassBindingFactory mainFactory, BindingRequest request) throws BindingConstructionException;
\r