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. import java.lang.reflect.Field;
  18. import java.lang.reflect.Constructor;
  19. import java.lang.reflect.Method;
  20. import java.util.Collection;
  21. /**
  22. * An attribute repository cache. Used internally to speed up operation.
  23. * All collections returned should be unmodifiable.
  24. */
  25. interface CachedRepository {
  26. public static final CachedRepository EMPTY = new EmptyCachedRepository ();
  27. public Collection getAttributes ();
  28. public Collection getAttributes (Field f);
  29. public Collection getAttributes (Method m);
  30. public Collection getParameterAttributes (Method m, int parameter);
  31. public Collection getParameterAttributes (Constructor c, int parameter);
  32. public Collection getReturnAttributes (Method m);
  33. public Collection getAttributes (Constructor c);
  34. }