Package sootup.core.frontend
Class OverridingBodySource
java.lang.Object
sootup.core.frontend.OverridingBodySource
- All Implemented Interfaces:
BodySource
Allows for replacing specific parts of a method or, resolve methods where all information is
already existing.
When replacing specific parts of a method by default, it delegates to the BodySource
delegate provided in the constructor.
To alter the results of invocations to e.g. resolveBody(Iterable)
, simply call withBody(Body)
to obtain a new OverridingBodySource
. The new instance will then use the
supplied value instead of calling resolveBody(Iterable)
on the delegate.
-
Constructor Summary
ConstructorDescriptionOverridingBodySource
(BodySource delegate) OverridingBodySource
(MethodSignature methodSignature, Body body) Method source where all information already available -
Method Summary
Modifier and TypeMethodDescriptionresolveBody
(Iterable<MethodModifier> modifiers) Returns a filled-out body for the given SootMethod.
-
Constructor Details
-
OverridingBodySource
-
OverridingBodySource
Method source where all information already available
-
-
Method Details
-
resolveBody
Description copied from interface:BodySource
Returns a filled-out body for the given SootMethod. This may be an expensive operation.- Specified by:
resolveBody
in interfaceBodySource
- Parameters:
modifiers
- The collection of modifiers which are needed by BodyInterceptors to modify the body accordingly.- Throws:
IOException
-
resolveAnnotationsDefaultValue
- Specified by:
resolveAnnotationsDefaultValue
in interfaceBodySource
- Returns:
- returns the default value of the Annotation for this method
-
getSignature
- Specified by:
getSignature
in interfaceBodySource
-
withBody
-