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 8 package com.sun.mirror.util; 9 10 11 import com.sun.mirror.declaration.*; 12 13 14 /** 15 * Utility methods for operating on declarations. 16 * 17 * @author Joseph D. Darcy 18 * @author Scott Seligman 19 * @version 1.1 04/01/26 20 * @since 1.5 21 */ 22 23 public interface Declarations { 24 25 /** 26 * Tests whether one type, method, or field declaration hides another. 27 * 28 * @param sub the first member 29 * @param sup the second member 30 * @return <tt>true</tt> if and only if the first member hides 31 * the second 32 */ 33 boolean hides(MemberDeclaration sub, MemberDeclaration sup); 34 35 /** 36 * Tests whether one method overrides another. When a 37 * non-abstract method overrides an abstract one, the 38 * former is also said to <i>implement</i> the latter. 39 * 40 * @param sub the first method 41 * @param sup the second method 42 * @return <tt>true</tt> if and only if the first method overrides 43 * the second 44 */ 45 boolean overrides(MethodDeclaration sub, MethodDeclaration sup); 46 } 47