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
ConstructorDescriptionMutableJavaView
(List<AnalysisInputLocation> inputLocations) MutableJavaView
(AnalysisInputLocation inputLocation) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ViewChangeListener listener) void
addClass
(JavaSootClass clazz) Adds the provided class to the mutable view.void
addMethod
(JavaSootMethod method) Adds the provided method to the respective class within the view.void
removeChangeListener
(ViewChangeListener listener) void
removeClass
(ClassType classType) Removes the class that matches the providedClassType
from the mutable view.void
removeClass
(JavaSootClass clazz) Removes the provided class from the mutable view.void
removeMethod
(JavaSootMethod method) Removes the provided method from the respective class it belongs to that is within the view.void
replaceClass
(JavaSootClass oldClass, JavaSootClass newClass) Removes the provided oldClass from the view and adds the provided newClass.void
replaceMethod
(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, getAnnotationClass, getCachedClassesCount, getClass, getClasses, getClassSource, getField, getIdentifierFactory, getMethod
Methods inherited from class sootup.core.views.AbstractView
getTypeHierarchy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 providedClassType
from 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:
addChangeListener
in interfaceMutableView
-
removeChangeListener
- Specified by:
removeChangeListener
in interfaceMutableView
-