KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > attributes > AttributeRepositoryClass


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.attributes;
17
18 import java.util.Set JavaDoc;
19 import java.util.Map JavaDoc;
20
21 /**
22  * Interface implemented by all attribute repository classes.
23  * This interface is used internally and should not be used
24  * by clients. The only reason it is public is because the
25  * classes implementing it may be in any package.
26  */

27 public interface AttributeRepositoryClass {
28     
29     /**
30      * Returns a set containing all attributes (instances) associated with this class.
31      * Should not return any attributes of superclasses etc.
32      */

33     public Set JavaDoc getClassAttributes ();
34     
35     /**
36      * Returns a map with String keys and Set values. The keys correspond to field names,
37      * and their associated Set values are the set of all attributes (instances) associated with that field.
38      * Should not return any attributes of superclasses etc.
39      */

40     public Map JavaDoc getFieldAttributes ();
41     
42     /**
43      * Returns a map with String keys and List values. The keys correspond to method signatures,
44      * given by get Util.getSignature method, and the lists are as follows:<p>
45      *
46      * list.get(0) = A Set with the attributes associated with the method.<p>
47      * list.get(1) = A Set with the attributes associated with the method's return value.<p>
48      * list.get(2) = A Set with the attributes associated with the method's first parameter.<p>
49      * list.get(n) = A Set with the attributes associated with the method's (n - 1) th parameter.<p>
50      *
51      * All slots in the list must be filled, not just those where there are attributes.
52      *
53      * Should not return any attributes of superclasses etc.
54      */

55     public Map JavaDoc getMethodAttributes ();
56     
57     /**
58      * Returns a map with String keys and List values. The keys correspond to constructor signatures,
59      * given by get Util.getSignature method, and the lists are as follows:<p>
60      *
61      * list.get(0) = A Set with the attributes associated with the constructor.<p>
62      * list.get(1) = A Set with the attributes associated with the constructor's first parameter.<p>
63      * list.get(n) = A Set with the attributes associated with the constructor's (n - 1) th parameter.<p>
64      *
65      * All slots in the list must be filled, not just those where there are attributes.
66      *
67      * Should not return any attributes of superclasses etc.
68      */

69     public Map JavaDoc getConstructorAttributes ();
70 }
Popular Tags