Package org.jtool.slice
Class Slice
java.lang.Object
org.jtool.slice.Slice
An object storing information on a program slice.
-
Constructor Summary
ConstructorsConstructorDescriptionSlice
(SliceCriterion criterion) Creates a new object that represents a slice. -
Method Summary
Modifier and TypeMethodDescriptionObtains source code that constitutes this slice.Obtains source code that constitutes this slice.Obtains source code that constitutes this slice.Obtains source code that constitutes this slice.getCode
(JavaMethod jmethod) Obtains source code that constitutes this slice.getCode
(JavaMethod jmethod, Map<String, String> options) Obtains source code that constitutes this slice.Returns a target node for this slicing criterion.Returns the collection of target variables for this slicing criterion.Returns a dependency graph containing the target PDG.getNodes()
Obtains PDG nodes that contained in this slice.void
print()
Displays information on this slice.toString()
Obtains information on this slice.
-
Constructor Details
-
Slice
Creates a new object that represents a slice.- Parameters:
criterion
- a slicing criterion that derives this slice.
-
-
Method Details
-
getDependencyGraph
Returns a dependency graph containing the target PDG.- Returns:
- the dependency graph
-
getCriterionNode
Returns a target node for this slicing criterion.- Returns:
- the node
-
getCriterionVariables
Returns the collection of target variables for this slicing criterion.- Returns:
- the variables
-
getNodes
Obtains PDG nodes that contained in this slice.- Returns:
- the collection of the PDG nodes
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jclass
- a program element that encloses the source code- Returns:
- the contents of the source code
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jclass
- a program element that encloses the source codeoptions
- the options for formatting the source code- Returns:
- the contents of the source code
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jmethod
- a program element that encloses the source code- Returns:
- the contents of the source code
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jmethod
- a program element that encloses the source codeoptions
- the options for formatting the source code- Returns:
- the contents of the source code
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jfield
- a program element that encloses the source code- Returns:
- the contents of the source code
-
getCode
Obtains source code that constitutes this slice.- Parameters:
jfield
- a program element that encloses the source codeoptions
- the options for formatting the source code- Returns:
- the contents of the source code
-
print
public void print()Displays information on this slice. -
toString
Obtains information on this slice.
-