Explanation of Static Classes



Static Graph


What is a Static Class?

Static Classes are classes that were identified by analyzing the application binaries.

If all the binaries were provided to Viper, the process analyzing the application binaries, then most dynamic classes should also be static as they is part of the compiled byte code.

The classes that make up the domain are listed under the exclusive and non-exclusive sections of the static classes.

vFunction will issue a notification if the analysis detects dynamic classes that are not detected in the binaries. The exception to this are classes that were auto-generated during runtime by various application servers, e.g., Oracle WebLogic, may generate classes on the fly and these classes only exist in the application server’s memory. Therefore, they will not be part of the static classes.


What is a Pure Static Class?

Some static classes may not participate in the various execution flows and these classes are are called Pure Static Classes or “Static Only Classes”. These classes have an orange dot on their icon, as seen in the screenshot above.

Classes that cannot be instantiated like Interfaces, or Enums with just constants, or Abstract Classes that have no behavior, will always be pure static.


What are Compile Time Dependencies and Dependency Injection Dependencies?

The static analysis graph (shown above) shows Compile Time dependencies between the classes as solid arrows, and Dependency Injection (DI) Dependencies as dashed line arrows.

Every static class in the scope of the domain (Exclusive, Non-Exclusive, Common) must either be dynamic (i.e., non-pure) or have a dependency path from a dynamic class of the domain. A Dependency Path is a chain of Compile Time Dependencies from a dynamic class included to it. Pure static classes in the static graph (seen in the above figure) have an action called SHOW DEPENDENCY PATH that will show the path to clarify why the pure static class is included in the domain.