Type and Package Dependencies

Type Dependencies

A type T uses a type Dep if one of the following holds:

  1. T is the same type as Dep.
  2. T is a parameterized instance of Dep.
  3. Dep is a type argument of the parameterized type T.
  4. Dep is the element type of the array type T.

A type T depends on a type Dep if one of the following holds:

  1. Dep is a supertype of T.
  2. Dep encloses the nested type T.
  3. There is a field in T whose type uses Dep.
  4. There is a method in T whose return type uses Dep.
  5. There is a method or constructor in T which has a parameter whose type uses Dep.
  6. There is a method or constructor in T which throws an exception whose type uses Dep.
  7. A method or constructor declared in T calls a method declared in Dep.
  8. A method or constructor declared in T reads a field declared in Dep.
  9. A method or constructor declared in T writes a field declared in Dep.
  10. A method or constructor declared in T declares a local variable whose type uses Dep.
  11. A method or constructor declared in T contains a type literal that uses Dep.
  12. They depend through an annotation.
  13. A method or constructor declared in T contains an instanceof expression that uses Dep.
Package Dependencies
A package q depends on a package q if there is a class within p that depends on a class within q.
 
< Prev