org.pf.tools.cda.base.model
Class ClassSpace

java.lang.Object
  extended by org.pf.tools.cda.base.model.ClassSpace
All Implemented Interfaces:
IClassInformationFactory, IClassSpace

public class ClassSpace
extends java.lang.Object
implements IClassSpace, IClassInformationFactory

The class space eventually is the container that provides access to all classes that can be found within a Workset. It holds all class containers. Therefore it provides search methods for class files which do a lookup through all the class containers.

Version:
1.3
Author:
Manfred Duchrow

Constructor Summary
ClassSpace(Workset workset)
          Initialize the new instance with the workset it belongs to.
 
Method Summary
 void addClassContainer(GenericClassContainer container)
          Add the given container at the end of the current container list
 boolean contains(GenericClassContainer container)
          Returns true if this class space already contains the given container
 ClassInformation createClassInfo(java.lang.String className, ClassPackage pack)
          Create a new ClassInformation object representing a class with the given name in the given package.
 ClassContainer findContainerNamed(java.lang.String containerName)
          Returns the class container with the given name or null, if it cannot be found.
 java.util.List getClassContainers()
          Returns all class containers of this class space.
 ClassInformation getClassInfo(java.lang.String className)
          Returns the ClassInformation object corresponding to the given className.
 GenericClassContainer getNotFoundClassesContainer()
          Returns the container that holds all classes that cannot be found in any other container.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSpace

public ClassSpace(Workset workset)
Initialize the new instance with the workset it belongs to.

Method Detail

getClassContainers

public java.util.List getClassContainers()
Description copied from interface: IClassSpace
Returns all class containers of this class space.

Specified by:
getClassContainers in interface IClassSpace
Returns:
A List

getNotFoundClassesContainer

public GenericClassContainer getNotFoundClassesContainer()
Description copied from interface: IClassSpace
Returns the container that holds all classes that cannot be found in any other container.

Specified by:
getNotFoundClassesContainer in interface IClassSpace

findContainerNamed

public ClassContainer findContainerNamed(java.lang.String containerName)
Returns the class container with the given name or null, if it cannot be found.

Specified by:
findContainerNamed in interface IClassSpace
Parameters:
containerName - The name of the container to look up (must not be null)

contains

public boolean contains(GenericClassContainer container)
Returns true if this class space already contains the given container


addClassContainer

public void addClassContainer(GenericClassContainer container)
Add the given container at the end of the current container list


getClassInfo

public ClassInformation getClassInfo(java.lang.String className)
Returns the ClassInformation object corresponding to the given className. The result might be newly created instance of ClassInformation or an already in the workset existing object.

Specified by:
getClassInfo in interface IClassSpace
Parameters:
className - The fully qualified class name (Must not be null)
See Also:
ClassInformation.isComplete()

createClassInfo

public ClassInformation createClassInfo(java.lang.String className,
                                        ClassPackage pack)
Create a new ClassInformation object representing a class with the given name in the given package.

Specified by:
createClassInfo in interface IClassInformationFactory