org.kite9.framework.model
Class ProjectModelImpl

java.lang.Object
  extended by org.kite9.framework.model.ProjectModelImpl
All Implemented Interfaces:
ProjectModel

public class ProjectModelImpl
extends Object
implements ProjectModel


Constructor Summary
ProjectModelImpl()
           
 
Method Summary
 void addAnnotationReference(String referredClass, AnnotationHandle by)
           
 void addCalls(MemberHandle desc, MemberHandle mh)
           
 void addClass(String name)
           
 void addClassAnnotation(String desc, String className)
           
 void addClassDependency(String from, String on)
           
 void addMemberAnnotation(String desc, MemberHandle mh)
           
 void addPackageClass(String packageName, String cl)
           
 void addPackageDependency(PackageHandle from, PackageHandle on)
           
 void addSubclass(String superName, String name)
           
 Set<AnnotationHandle> getAnnotationReferences(String className)
          Returns the annotations that refer to this class
 Set<MemberHandle> getCalledBy(MemberHandle m)
          Returns a set of methods a given method is called by, within the project scope
 List<MemberHandle> getCalls(MemberHandle m)
          Returns a list of all the methods that a given method calls, within the model scope
 int getClassCount()
           
 Set<String> getClassesInPackage(String packageName)
          Returns the classNames within the package.
 Set<String> getClassesWithAnnotation(String annotationName)
          Returns all the classes within the project having a given annotation
 Set<String> getDependedOnClasses(String className)
          Gets the classes in the model that depend on this class
 Set<PackageHandle> getDependedOnPackages(PackageHandle packageName)
          Gets the classes in the model that depend on this class
 Set<String> getDependsOnClasses(String className)
          Gets the immediate (i.e.
 Set<PackageHandle> getDependsOnPackages(PackageHandle packageName)
          Gets the immediate (i.e.
 Set<MemberHandle> getMembersWithAnnotation(String annotationName)
          Returns fields and methods defined within the project with a given annotation
 Set<String> getSubclasses(String className)
          Returns the subclasses defined within the project scope, of a given class.
 boolean withinModel(String className)
          Returns true if the class is within the scanned part of the project
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectModelImpl

public ProjectModelImpl()
Method Detail

getCalls

public List<MemberHandle> getCalls(MemberHandle m)
Description copied from interface: ProjectModel
Returns a list of all the methods that a given method calls, within the model scope

Specified by:
getCalls in interface ProjectModel

getCalledBy

public Set<MemberHandle> getCalledBy(MemberHandle m)
Description copied from interface: ProjectModel
Returns a set of methods a given method is called by, within the project scope

Specified by:
getCalledBy in interface ProjectModel

getClassesWithAnnotation

public Set<String> getClassesWithAnnotation(String annotationName)
Description copied from interface: ProjectModel
Returns all the classes within the project having a given annotation

Specified by:
getClassesWithAnnotation in interface ProjectModel

getMembersWithAnnotation

public Set<MemberHandle> getMembersWithAnnotation(String annotationName)
Description copied from interface: ProjectModel
Returns fields and methods defined within the project with a given annotation

Specified by:
getMembersWithAnnotation in interface ProjectModel

getSubclasses

public Set<String> getSubclasses(String className)
Description copied from interface: ProjectModel
Returns the subclasses defined within the project scope, of a given class.

Specified by:
getSubclasses in interface ProjectModel

addSubclass

public void addSubclass(String superName,
                        String name)

addClassAnnotation

public void addClassAnnotation(String desc,
                               String className)

addMemberAnnotation

public void addMemberAnnotation(String desc,
                                MemberHandle mh)

addCalls

public void addCalls(MemberHandle desc,
                     MemberHandle mh)

addClassDependency

public void addClassDependency(String from,
                               String on)

addPackageDependency

public void addPackageDependency(PackageHandle from,
                                 PackageHandle on)

addPackageClass

public void addPackageClass(String packageName,
                            String cl)

addClass

public void addClass(String name)

getClassesInPackage

public Set<String> getClassesInPackage(String packageName)
Description copied from interface: ProjectModel
Returns the classNames within the package.

Specified by:
getClassesInPackage in interface ProjectModel

withinModel

public boolean withinModel(String className)
Description copied from interface: ProjectModel
Returns true if the class is within the scanned part of the project

Specified by:
withinModel in interface ProjectModel

getClassCount

public int getClassCount()

getDependedOnClasses

public Set<String> getDependedOnClasses(String className)
Description copied from interface: ProjectModel
Gets the classes in the model that depend on this class

Specified by:
getDependedOnClasses in interface ProjectModel

getDependsOnClasses

public Set<String> getDependsOnClasses(String className)
Description copied from interface: ProjectModel
Gets the immediate (i.e. non-transitive) dependencies of a given class, defined within the project scope.

Specified by:
getDependsOnClasses in interface ProjectModel

getDependedOnPackages

public Set<PackageHandle> getDependedOnPackages(PackageHandle packageName)
Description copied from interface: ProjectModel
Gets the classes in the model that depend on this class

Specified by:
getDependedOnPackages in interface ProjectModel

getDependsOnPackages

public Set<PackageHandle> getDependsOnPackages(PackageHandle packageName)
Description copied from interface: ProjectModel
Gets the immediate (i.e. non-transitive) dependencies of a given package, defined within the project scope.

Specified by:
getDependsOnPackages in interface ProjectModel

getAnnotationReferences

public Set<AnnotationHandle> getAnnotationReferences(String className)
Description copied from interface: ProjectModel
Returns the annotations that refer to this class

Specified by:
getAnnotationReferences in interface ProjectModel

addAnnotationReference

public void addAnnotationReference(String referredClass,
                                   AnnotationHandle by)


Copyright © 2011. All Rights Reserved.