1. /*
  2. * @(#)Declarations.java 1.1 04/01/26
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.mirror.util;
  8. import com.sun.mirror.declaration.*;
  9. /**
  10. * Utility methods for operating on declarations.
  11. *
  12. * @author Joseph D. Darcy
  13. * @author Scott Seligman
  14. * @version 1.1 04/01/26
  15. * @since 1.5
  16. */
  17. public interface Declarations {
  18. /**
  19. * Tests whether one type, method, or field declaration hides another.
  20. *
  21. * @param sub the first member
  22. * @param sup the second member
  23. * @return <tt>true</tt> if and only if the first member hides
  24. * the second
  25. */
  26. boolean hides(MemberDeclaration sub, MemberDeclaration sup);
  27. /**
  28. * Tests whether one method overrides another. When a
  29. * non-abstract method overrides an abstract one, the
  30. * former is also said to <i>implement</i> the latter.
  31. *
  32. * @param sub the first method
  33. * @param sup the second method
  34. * @return <tt>true</tt> if and only if the first method overrides
  35. * the second
  36. */
  37. boolean overrides(MethodDeclaration sub, MethodDeclaration sup);
  38. }