01: /*
02: *
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.sf.net).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.conform;
15:
16: import java.util.*;
17:
18: /**
19: * @version $Revision: 675 $
20: */
21: public class VariationBeanMetaProvider extends
22: DelegatingBeanMetaProvider {
23: private List<Modifier> modifiers = new LinkedList<Modifier>();
24:
25: public VariationBeanMetaProvider() {
26: }
27:
28: public VariationBeanMetaProvider(BeanMetaProvider parent) {
29: setParent(parent);
30: }
31:
32: public VariationBeanMetaProvider addModifier(Modifier modifier) {
33: modifiers.add(modifier);
34: return this ;
35: }
36:
37: protected void configure(BeanMeta beanMeta) {
38: for (Modifier modifier : modifiers)
39: modifier.modify(beanMeta);
40: }
41:
42: public void setModifiers(List<Modifier> modifiers) {
43: for (Modifier modifier : modifiers)
44: addModifier(modifier);
45: }
46: }
|