Class OverridingJavaClassSource

java.lang.Object
sootup.java.core.JavaSootClassSource
sootup.java.core.OverridingJavaClassSource
All Implemented Interfaces:
SootClassSource, HasGenericSignature

public class OverridingJavaClassSource extends JavaSootClassSource
Allows for replacing specific parts of a class, such as fields and methods. Every part that is not overridden is resolved from the SootClassSource delegate provided in the constructor.

To create a class source from scratch (e.g. classes that are batchparsed or synthesized in tests) where all information is already available, use InMemoryJavaClassSource.

To alter the results of invocations to e.g. resolveFields(), simply call withFields(Collection) to obtain a new OverridingJavaClassSource. The new instance will then use the supplied value instead of calling resolveFields() on the delegate.

Author:
Christian Brüggemann, Hasitha Rajapakse