1 package org.kite9.framework.model;
2
3 import java.util.Set;
4
5 /***
6 * Returns information about the java project which can only be ascertained by bytecode scanning
7 * the project structure.
8 *
9 * @author moffatr
10 *
11 */
12 public interface ProjectModel {
13
14 /***
15 * Returns a set of all the methods that call a given method, within the model scope
16 */
17 public Set<MemberHandle> getCalls(MemberHandle m);
18
19 /***
20 * Returns a set of methods being called by a given method, within the project scope
21 */
22 public Set<MemberHandle> getCalledBy(MemberHandle m);
23
24 /***
25 * Returns the subclasses defined within the project scope, of a given class.
26 */
27 public Set<String> getSubclasses(String className);
28
29 /***
30 * Returns all the classes within the project having a given annotation
31 */
32 public Set<String> getClassesWithAnnotation(String annotationName);
33
34 /***
35 * Returns fields and methods defined within the project with a given annotation
36 */
37 public Set<MemberHandle> getMembersWithAnnotation(String annotationName);
38
39 /***
40 * Gets the immediate (i.e. non-transitive) dependencies of a given class, defined within
41 * the project scope.
42 */
43 public Set<String> getDependsOn(String className);
44
45 /***
46 * Gets the classes in the model that depend on this class
47 */
48 public Set<String> getDependedOn(String className);
49
50 /***
51 * Returns true if the class is within the scanned part of the project
52 */
53 public boolean withinModel(String className);
54
55 /***
56 * Returns the classNames within the package.
57 */
58 public Set<String> getClassesInPackage(String packageName);
59
60 }