Package sootup.java.core.views
Class MutableJavaView
java.lang.Object
sootup.core.views.AbstractView
sootup.java.core.views.JavaView
sootup.java.core.views.MutableJavaView
- All Implemented Interfaces:
MutableView,View
This view, in contrast to other views, can be modified. Classes and methods can be added, removed
and replaced within the view.
-
Field Summary
Fields inherited from class sootup.java.core.views.JavaView
cache, identifierFactory, inputLocations, isFullyResolved -
Constructor Summary
ConstructorsConstructorDescriptionMutableJavaView(@NonNull List<AnalysisInputLocation> inputLocations) MutableJavaView(@NonNull AnalysisInputLocation inputLocation) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(ViewChangeListener listener) voidaddClass(JavaSootClass clazz) Adds the provided class to the mutable view.voidaddMethod(JavaSootMethod method) Adds the provided method to the respective class within the view.voidremoveChangeListener(ViewChangeListener listener) voidremoveClass(ClassType classType) Removes the class that matches the providedClassTypefrom the mutable view.voidremoveClass(JavaSootClass clazz) Removes the provided class from the mutable view.voidremoveMethod(JavaSootMethod method) Removes the provided method from the respective class it belongs to that is within the view.voidreplaceClass(JavaSootClass oldClass, JavaSootClass newClass) Removes the provided oldClass from the view and adds the provided newClass.voidreplaceMethod(JavaSootMethod oldMethod, JavaSootMethod newMethod) Removes the provided oldMethod from the respective class within the view and adds the provided newMethod.Methods inherited from class sootup.java.core.views.JavaView
buildClassFrom, getCachedClassesCount, getClass, getClasses, getClassSource, getField, getIdentifierFactory, getMethodMethods inherited from class sootup.core.views.AbstractView
getTypeHierarchyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sootup.core.views.View
getClassOrThrow
-
Constructor Details
-
MutableJavaView
-
MutableJavaView
-
-
Method Details
-
addClass
Adds the provided class to the mutable view. If the provided class already exists in the view, a warning will be logged and the provided class will not be added a second time. -
removeClass
Removes the class that matches the providedClassTypefrom the mutable view. -
removeClass
Removes the provided class from the mutable view. -
replaceClass
Removes the provided oldClass from the view and adds the provided newClass. -
removeMethod
Removes the provided method from the respective class it belongs to that is within the view. -
addMethod
Adds the provided method to the respective class within the view. -
replaceMethod
Removes the provided oldMethod from the respective class within the view and adds the provided newMethod. -
addChangeListener
- Specified by:
addChangeListenerin interfaceMutableView
-
removeChangeListener
- Specified by:
removeChangeListenerin interfaceMutableView
-