Packages

object ClassHierarchy

Factory methods for creating ClassHierarchy objects.

Source
ClassHierarchy.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClassHierarchy
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final val JustObject: UIDSet[ObjectType]
  2. lazy val PreInitializedClassHierarchy: ClassHierarchy

    Creates a ClassHierarchy that captures the type hierarchy related to the exceptions thrown by specific Java bytecode instructions as well as fundamental types such as Cloneable and Serializable and also those types related to reflection..

    Creates a ClassHierarchy that captures the type hierarchy related to the exceptions thrown by specific Java bytecode instructions as well as fundamental types such as Cloneable and Serializable and also those types related to reflection..

    This class hierarchy is primarily useful for testing purposes.

  3. def apply(classFiles: Iterable[ClassFile], typeHierarchyDefinitions: Seq[() => InputStream] = defaultTypeHierarchyDefinitions())(implicit logContext: LogContext): ClassHierarchy
  4. def create(classFiles: Iterable[ClassFile], typeDeclarations: Iterable[TypeDeclaration])(implicit logContext: LogContext): ClassHierarchy

    Creates the class hierarchy by analyzing the given class files, the predefined type declarations, and the specified predefined class hierarchies.

    Creates the class hierarchy by analyzing the given class files, the predefined type declarations, and the specified predefined class hierarchies.

    By default the class hierarchy related to the exceptions thrown by bytecode instructions are predefined as well as the class hierarchy related to the main classes of the JDK. See the file ClassHierarchyJVMExceptions.ths, ClassHierarchyJLS.ths and ClassHierarchyJava7-java.lang.reflect.ths (text files) for further details.

    Basically, only the part of a project's class hierarchy is reified that is referred to in the class declarations of the analyzed classes I.e., those classes which are directly referred to in class declarations, but for which the respective class file was not analyzed, are also considered to be visible and are integrated in the class hierarchy. However, types only referred to in the body of a method, but for which neither the defining class file is analyzed nor a class exists that inherits from them are not integrated. For example, if the class file of the class java.util.ArrayList is analyzed, then the class hierarchy will have some information about, e.g., java.util.List from which ArrayList inherits. However, the information about List is incomplete and List will be a boundary class unless we also analyze the class file that defines java.util.List.

  5. def defaultTypeHierarchyDefinitions(): List[() => InputStream]
  6. def noDefaultTypeHierarchyDefinitions(): List[() => InputStream]
  7. def parseTypeHierarchyDefinition(in: InputStream)(implicit logContext: LogContext): Seq[TypeDeclaration]