/** * Get the finder used to locate the dependencies for a class. * @return the finder */ public Finder getFinder() { if (finder == null) finder = getDefaultFinder(); return finder; }
/** * Set the finder used to locate the dependencies for a class. * @param f the finder */ public void setFinder(Finder f) { f.getClass(); // null check finder = f; }
/** * Get the default finder used to locate the dependencies for a class. * @return the default finder */ public static Finder getDefaultFinder() { return new APIDependencyFinder(AccessFlags.ACC_PRIVATE); }
/** * Get a finder used to locate the API dependencies for a class. * These include the superclass, superinterfaces, and classes referenced in * the declarations of fields and methods. The fields and methods that * are checked can be limited according to a specified access. * The access parameter must be one of {@link AccessFlags#ACC_PUBLIC ACC_PUBLIC}, * {@link AccessFlags#ACC_PRIVATE ACC_PRIVATE}, * {@link AccessFlags#ACC_PROTECTED ACC_PROTECTED}, or 0 for * package private access. Members with greater than or equal accessibility * to that specified will be searched for dependencies. * @param access the access of members to be checked * @return an API finder */ public static Finder getAPIFinder(int access) { return new APIDependencyFinder(access); }
/** * Get a finder to do class dependency analysis. * * @return a Class dependency finder */ public static Finder getClassDependencyFinder() { return new ClassDependencyFinder(); }
/** * Set the finder used to locate the dependencies for a class. * @param f the finder */ public void setFinder(Finder f) { finder = Objects.requireNonNull(f); }