KickJava   Java API By Example, From Geeks To Geeks.

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


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.lang.reflect.Field JavaDoc;
19 import java.lang.reflect.Constructor JavaDoc;
20 import java.lang.reflect.Method JavaDoc;
21 import java.util.ArrayList JavaDoc;
22 import java.util.Collection JavaDoc;
23
24 /**
25  * Null implementation of a cached repository.
26  */

27 class EmptyCachedRepository implements CachedRepository {
28     
29     private final static Collection JavaDoc EMPTY_COLLECTION = new ArrayList JavaDoc (0);
30     
31     public Collection JavaDoc getAttributes () {
32         return EMPTY_COLLECTION;
33     }
34     
35     public Collection JavaDoc getAttributes (Field JavaDoc f) {
36         return EMPTY_COLLECTION;
37     }
38     
39     public Collection JavaDoc getAttributes (Method JavaDoc m) {
40         return EMPTY_COLLECTION;
41     }
42     
43     public Collection JavaDoc getParameterAttributes (Constructor JavaDoc c, int parameter) {
44         return EMPTY_COLLECTION;
45     }
46     
47     public Collection JavaDoc getParameterAttributes (Method JavaDoc m, int parameter) {
48         return EMPTY_COLLECTION;
49     }
50     
51     public Collection JavaDoc getReturnAttributes (Method JavaDoc m) {
52         return EMPTY_COLLECTION;
53     }
54     
55     public Collection JavaDoc getAttributes (Constructor JavaDoc c) {
56         return EMPTY_COLLECTION;
57     }
58 }
59
Popular Tags