01: /*****************************************************************************
02: * Copyright (C) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Original code by *
09: *****************************************************************************/package org.picocontainer.behaviors;
10:
11: import org.picocontainer.BehaviorFactory;
12:
13: /**
14: * Static collection of factory methods for different BehaviourFactory implementations.
15: *
16: * @author Paul Hammant
17: * @author Mauro Talevi
18: */
19: public class Behaviors {
20:
21: /**
22: * Prevents instantiation
23: */
24: private Behaviors() {
25: // no-op
26: }
27:
28: public static BehaviorFactory implementationHiding() {
29: return new ImplementationHiding();
30: }
31:
32: public static BehaviorFactory caching() {
33: return new Caching();
34: }
35:
36: public static BehaviorFactory synchronizing() {
37: return new Synchronizing();
38: }
39:
40: public static BehaviorFactory locking() {
41: return new Locking();
42: }
43:
44: public static BehaviorFactory propertyApplying() {
45: return new PropertyApplying();
46: }
47:
48: public static BehaviorFactory automatic() {
49: return new Automating();
50: }
51:
52: }
|