com.sun.tools.apt.mirror.util
Class DeclarationsImpl
java.lang.Object
com.sun.tools.apt.mirror.util.DeclarationsImpl
- All Implemented Interfaces:
- Declarations
public class DeclarationsImpl
- extends java.lang.Object
- implements Declarations
Implementation of Declarations utility methods for annotation processors
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
env
private final AptEnv env
declarationsKey
private static final Context.Key<Declarations> declarationsKey
DeclarationsImpl
private DeclarationsImpl(Context context)
instance
public static Declarations instance(Context context)
hides
public boolean hides(MemberDeclaration sub,
MemberDeclaration sup)
- Tests whether one type, method, or field declaration hides another.
See JLS 2 sections 8.3 and 8.4.6.
- Specified by:
hides in interface Declarations
- Parameters:
sub - the first membersup - the second member
- Returns:
- true if and only if the first member hides
the second
overrides
public boolean overrides(MethodDeclaration sub,
MethodDeclaration sup)
- Tests whether one method overrides another. When a
non-abstract method overrides an abstract one, the
former is also said to implement the latter.
See JLS 2 section 8.4.6.1.
- Specified by:
overrides in interface Declarations
- Parameters:
sub - the first methodsup - the second method
- Returns:
- true if and only if the first method overrides
the second