KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > component > type > ProActiveInterfaceType


1 /*
2  * ################################################################
3  *
4  * ProActive: The Java(TM) library for Parallel, Distributed,
5  * Concurrent computing with Security and Mobility
6  *
7  * Copyright (C) 1997-2004 INRIA/University of Nice-Sophia Antipolis
8  * Contact: proactive-support@inria.fr
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23  * USA
24  *
25  * Initial developer(s): The ProActive Team
26  * http://www.inria.fr/oasis/ProActive/contacts.html
27  * Contributor(s):
28  *
29  * ################################################################
30  */

31 package org.objectweb.proactive.core.component.type;
32
33 import java.io.Serializable JavaDoc;
34
35
36 import org.apache.log4j.Logger;
37
38 import org.objectweb.fractal.api.Type;
39 import org.objectweb.fractal.api.type.InterfaceType;
40
41
42 /**
43  * Implementation of InterfaceType (@see org.objectweb.fractal.api.type.InterfaceType)
44  *
45  * @author Matthieu Morel
46  *
47  */

48 public class ProActiveInterfaceType implements InterfaceType, Serializable JavaDoc {
49     protected static Logger logger = Logger.getLogger(ProActiveInterfaceType.class.getName());
50
51
52     /**
53        * The generatedClassName of the interface described by this type.
54        */

55     private String JavaDoc name;
56
57     /**
58      * The Java type of the interface described by this type.
59      */

60     private String JavaDoc signature;
61
62     private boolean isClient;
63     private boolean isOptional;
64     private boolean isCollection;
65     /**
66      * Constructor for ProActiveInterfaceType.
67      */

68     public ProActiveInterfaceType() {
69         super();
70     }
71     
72     /**
73      * copy constructor
74      * @param name
75      * @param signature
76      * @param isClient
77      * @param isOptional
78      * @param isCollection
79      */

80     public ProActiveInterfaceType(final InterfaceType itfType) {
81         this.name = new String JavaDoc(itfType.getFcItfName());
82         this.signature = new String JavaDoc(itfType.getFcItfSignature());
83         this.isClient = itfType.isFcClientItf();
84         this.isOptional = itfType.isFcOptionalItf();
85         this.isCollection = itfType.isFcCollectionItf();
86     }
87     /**
88      * Constructor for ProActiveInterfaceType.
89      */

90     public ProActiveInterfaceType(String JavaDoc name, String JavaDoc signature, boolean isClient, boolean isOptional,
91                                   boolean isCollection) {
92         
93         this.name = name;
94         this.signature = signature;
95         this.isClient = isClient;
96         this.isOptional = isOptional;
97         this.isCollection = isCollection;
98     }
99
100     // -------------------------------------------------------------------------
101
// Implementation of the InterfaceType interface
102
// -------------------------------------------------------------------------
103

104     /**
105      * @see org.objectweb.fractal.api.type.InterfaceType#getFcItfName()
106      */

107     public String JavaDoc getFcItfName() {
108         return name;
109     }
110
111     /**
112      * @see org.objectweb.fractal.api.type.InterfaceType#getFcItfSignature()
113      */

114     public String JavaDoc getFcItfSignature() {
115         return signature;
116     }
117
118     /**
119      * @see org.objectweb.fractal.api.type.InterfaceType#isFcClientItf()
120      */

121     public boolean isFcClientItf() {
122         return isClient;
123     }
124
125     /**
126      * @see org.objectweb.fractal.api.type.InterfaceType#isFcOptionalItf()
127      */

128     public boolean isFcOptionalItf() {
129         return isOptional;
130     }
131
132     /**
133      * @see org.objectweb.fractal.api.type.InterfaceType#isFcCollectionItf()
134      */

135     public boolean isFcCollectionItf() {
136         return isCollection;
137     }
138
139     /**
140      * TODO : provide implementation for isFcSubTypeOf
141      * @see org.objectweb.fractal.api.Type#isFcSubTypeOf(Type)
142      */

143     public boolean isFcSubTypeOf(final Type type) {
144         throw new RuntimeException JavaDoc("Not yet implemented.");
145     }
146 }
Popular Tags