Home > Products > SophiaCompress(Java) OASIS > Inside SophiaCpmpress(Java) > - 5 -

Inside SophiaCompress(Java) OASIS

Delete unused Fields

What is an "unused Field" ?

A "Field" is a class variable.

To say a Field is unused means that there are no read instructions from that field throughout the Bytecodes. Fields with write instructions, but no read instructions do nothing and may be deleted.

A static final field is actually replaced by a constant after compilation, and so may be deleted.

Delete write instruction

When SophiaCompress(Java) OASIS deletes a unused field, the information and write instructions of that field are also deleted.

Delete unused methods

A method that is not called can be deleted.

For example, a private method never called can be deleted, but a method that overrides the methods of Object class should not be deleted.

Delete unused classes

A class that is not referred to can be deleted.

Delete unnecessary interfaces

An interface that is implemented by only one class or does not call a method can be deleted.