Package sootup.java.core
Class JavaSootMethod
java.lang.Object
sootup.core.model.SootClassMember<MethodSignature>
sootup.core.model.SootMethod
sootup.java.core.JavaSootMethod
- All Implemented Interfaces:
HasPosition
,Method
,HasAnnotation
- Direct Known Subclasses:
JavaAnnotationSootMethod
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
Defines aJavaSootField.JavaSootFieldBuilder
to provide a fluent API.Nested classes/interfaces inherited from class sootup.core.model.SootMethod
SootMethod.BuildStep, SootMethod.MethodSourceStep, SootMethod.ModifierStep, SootMethod.SignatureStep, SootMethod.SootMethodBuilder, SootMethod.ThrownExceptionsStep
-
Field Summary
Fields inherited from class sootup.core.model.SootMethod
bodySource, exceptions
-
Constructor Summary
ConstructorsConstructorDescriptionJavaSootMethod
(@NonNull BodySource source, @NonNull MethodSignature methodSignature, @NonNull Iterable<MethodModifier> modifiers, @NonNull Iterable<ClassType> thrownExceptions, @NonNull Iterable<AnnotationUsage> annotations, @NonNull Position position) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull JavaSootMethod.AnnotationOrSignatureStep
builder()
@NonNull Iterable<AnnotationUsage>
@NonNull JavaSootMethod
withAnnotations
(@NonNull Iterable<AnnotationUsage> annotations) @NonNull JavaSootMethod
@NonNull JavaSootMethod
withModifiers
(@NonNull Iterable<MethodModifier> modifiers) @NonNull JavaSootMethod
withOverridingMethodSource
(@NonNull Function<OverridingBodySource, OverridingBodySource> overrider) Creates a new SootMethod based on a newOverridingBodySource
.@NonNull JavaSootMethod
withSource
(@NonNull BodySource source) @NonNull JavaSootMethod
withThrownExceptions
(@NonNull Iterable<ClassType> thrownExceptions) Methods inherited from class sootup.core.model.SootMethod
equals, equivHashCode, getBody, getBodySource, getDeclClassType, getExceptionSignatures, getModifiers, getName, getParameterCount, getParameterType, getParameterTypes, getReturnType, getSubSignature, hasBody, hashCode, isAbstract, isConcrete, isConstructor, isDefaultConstructor, isFinal, isMain, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, toString
Methods inherited from class sootup.core.model.SootClassMember
getDeclaringClassType, getPosition, getSignature, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface sootup.core.model.Method
getSignature
-
Constructor Details
-
JavaSootMethod
public JavaSootMethod(@NonNull BodySource source, @NonNull MethodSignature methodSignature, @NonNull Iterable<MethodModifier> modifiers, @NonNull Iterable<ClassType> thrownExceptions, @NonNull Iterable<AnnotationUsage> annotations, @NonNull Position position)
-
-
Method Details
-
getAnnotations
- Specified by:
getAnnotations
in interfaceHasAnnotation
-
withOverridingMethodSource
public @NonNull JavaSootMethod withOverridingMethodSource(@NonNull Function<OverridingBodySource, OverridingBodySource> overrider) Description copied from class:SootMethod
Creates a new SootMethod based on a newOverridingBodySource
. This is useful to change selected parts of aSootMethod
without recreating aBodySource
completely.OverridingBodySource
allows for replacing the body of a method.- Overrides:
withOverridingMethodSource
in classSootMethod
-
withSource
- Overrides:
withSource
in classSootMethod
-
withModifiers
- Overrides:
withModifiers
in classSootMethod
-
withThrownExceptions
- Overrides:
withThrownExceptions
in classSootMethod
-
withAnnotations
-
withBody
- Overrides:
withBody
in classSootMethod
-
builder
-