com.sun.tools.apt.mirror.util
Class DeclarationsImpl

java.lang.Object
  extended by 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


Field Summary
private static Context.Key<Declarations> declarationsKey
           
private  AptEnv env
           
 
Constructor Summary
private DeclarationsImpl(Context context)
           
 
Method Summary
 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.
static Declarations instance(Context context)
           
 boolean overrides(MethodDeclaration sub, MethodDeclaration sup)
          Tests whether one method overrides another. See JLS 2 section 8.4.6.1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

env

private final AptEnv env

declarationsKey

private static final Context.Key<Declarations> declarationsKey
Constructor Detail

DeclarationsImpl

private DeclarationsImpl(Context context)
Method Detail

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 member
sup - 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 method
sup - the second method
Returns:
true if and only if the first method overrides the second