Databases Reference
In-Depth Information
An Entity model element either corresponds to an explicit declaration in the
source code (e.g., Class, Interface, Method), a Java package, 3 or Java types that are
used but do not correspond to a known explicitly declared type (e.g., Array, Type
Variable). An entity type is UNKNOWN when the type cannot be determined due to
uncertainty in the analysis. Table 8.1 lists all entity model element types defined in
Sourcerer. These types adhere to their standard meaning in Java, as defined in the
Java Language Specification (JLS) [ 12 ].
A Relation model element represents a dependency between two Entities. A de-
pendency d originating from a source entity s to a target entity t is stored as a Rela-
tion r from s to t .Table 8.2 contains a complete list of the relation types with a brief
description and example for each. All of the relations are binary, linking a source
entity to a target. The source entity for a relation is smallest entity that contains the
code that triggers that relation. While containment is clear for most of the entities,
it should be noted that FIELD s are considered to contain their initializer code and
ENUM CONSTANT s are considered to call their constructors. The source entity is al-
ways found within the project being examined. This is not necessarily true of the
target entity. It can be a reference to the Java Standard Library or any other external
jar. In fact, due to missing dependencies, sometimes it is impossible to resolve the
type of the target entity.
PACKAGE
CLASS
INTERFACE
ENUM
ANNOTATION
INITIALIZER
FIELD
ENUM CONSTANT
CONSTRUCTOR
METHOD
ANNOTATION ELEMENT
PARAMETER
LOCAL VARIABLE
PRIMITIVE
ARRAY
TYPE VARIABLE
WILDCARD
PARAMETRIZED TYPE
UNKNOWN
Table 8.1: Entity types
A Comment model element represents the comments defined in the Java source
code.
3 Packages are not considered to be standard declared entities as they do not have a single declara-
tion.
 
Search WWH ::




Custom Search