1 /*
2 * Copyright 2006-2016 The JGUIraffe Team.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package net.sf.jguiraffe.gui.builder;
17
18 /**
19 * <p>
20 * Definition of an interface for querying new <code>{@link BeanBuilder}</code>
21 * objects.
22 * </p>
23 * <p>
24 * This interface provides a generic means for obtaining a new
25 * <code>BeanBuilder</code> instance that can be used for processing a script
26 * with bean definitions. It is a typical factory interface decoupling its
27 * clients from the concrete builder implementation.
28 * </p>
29 * <p>
30 * <em>Note:</em> An implementation is intended to be thread-safe, so that it
31 * can be shared between multiple threads. For the returned
32 * <code>BeanBuilder</code> instances however, this is not the case. They
33 * should be used by a single thread only.
34 * </p>
35 *
36 * @author Oliver Heger
37 * @version $Id: BeanBuilderFactory.java 205 2012-01-29 18:29:57Z oheger $
38 */
39 public interface BeanBuilderFactory
40 {
41 /**
42 * Returns a <code>BeanBuilder</code> object for processing a script with
43 * bean definitions. The returned object is fully initialized and can be
44 * used immediately.
45 *
46 * @return a new <code>BeanBuilder</code> instance
47 * @throws BuilderException if an error occurs
48 */
49 BeanBuilder getBeanBuilder() throws BuilderException;
50 }