KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > kilim > description > NullElement


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.description;
20
21 import org.objectweb.kilim.KilimException;
22
23 /**
24  * @author horn
25  * this class provides null providers and transformers ...
26  */

27 public class NullElement extends InlinedElement {
28     /**
29     * the public constructor of null elements. A null element is not considered as a property in Kilim since it can be used as a transformer.
30      * @param aTemplate : the template in which the element is declared.
31      * @param aName : the name of the element
32      * @param aStatus : the status of the element (should be one of KILIM.PUBLIC, KILIM.PROTECTED, KILIM.PRIVATE)
33      * @param isP is true when the element provides a value (it behaves like a provider)
34      * @param isT is true when the element performs an action (it behaves like a transformer)
35      * @throws KilimException :
36      */

37     public NullElement(String JavaDoc aName, int aStatus, boolean isP, boolean isT, TemplateDescription aTemplate) throws KilimException {
38         super(isP, isT, aTemplate);
39         setLocalName(aName);
40     }
41
42     /**
43      * @see org.objectweb.kilim.description.BasicElement#getKind()
44      */

45     public int getKind() {
46         return KILIM.NULL_ELEMENT;
47     }
48             
49     /**
50      * @see org.objectweb.kilim.description.TemplateElement#providesµValue()
51      */

52     public boolean providesValue() {
53         return true;
54     }
55     
56     /**
57      * @see org.objectweb.kilim.description.TemplateElement#performsAction()
58      */

59     public boolean performsAction() {
60         return true;
61     }
62     
63     /**
64      * @see org.objectweb.kilim.description.BasicElement#isEventSource()
65      */

66     public boolean isEventSource() {
67         return false;
68     }
69     
70     /**
71      * @see java.lang.Object#clone()
72      */

73     public Object JavaDoc clone() {
74             return this;
75     }
76 }
Popular Tags