KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > kilim > model > mapping > DefaultMappingContext


1 /**
2  * Copyright (C) 2002 Kelua SA
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.kilim.model.mapping;
20
21 import java.io.Serializable JavaDoc;
22 import java.util.Stack JavaDoc;
23
24 import org.objectweb.kilim.model.ComponentElement;
25
26 /**
27  * A mapping context is a container for all informations useful when performing the effective task associated to providers and transformers.
28  * This simple implementation provides two stacks : (1) callStack, a stack automatically managed by the Kilim infrastructure, which contains
29  * the RtComponentSources mirroring on the execution stack, (2) contextstack, a stack specifically managed by mappers.
30  * calls to getValue() and execute() methods.
31  * @author horn
32  */

33 public class DefaultMappingContext implements MappingContext, Serializable JavaDoc {
34     private Stack JavaDoc callStack = new Stack JavaDoc();
35     private Stack JavaDoc contextStack = new Stack JavaDoc();
36     private ComponentElement currentElement;
37         
38     /**
39      * Method DefaultMappingContext.
40      */

41     public DefaultMappingContext() { }
42     
43     /**
44      * Method getContextStack. It returns the contextStack.
45      * @return Stack
46      */

47     public Stack JavaDoc getContextStack() {
48         return contextStack;
49     }
50     
51     /**
52      * Method getCallStack. This method returns the callStack.
53      * @return Stack
54      */

55     public Stack JavaDoc getCallStack() {
56         return callStack;
57     }
58 }
59
Popular Tags