Package soot.jimple.infoflow.data
Class AccessPathFragment
java.lang.Object
soot.jimple.infoflow.data.AccessPathFragment
A fragment inside an access path
- Author:
- Steven Arzt
-
Constructor Summary
ConstructorsConstructorDescriptionAccessPathFragment(soot.SootField field) Creates a newAccessPathFragmentwithout a context and using the fields typeAccessPathFragment(soot.SootField field, soot.Type fieldType) Creates a newAccessPathFragmentwithout a contextAccessPathFragment(soot.SootField field, soot.Type fieldType, ContainerContext[] context) Creates a newAccessPathFragmentwith a specific context -
Method Summary
Modifier and TypeMethodDescriptioncopyWithNewContext(ContainerContext[] newContext) copyWithNewType(soot.Type newType) Copies this access path fragment with a new propagated type.static AccessPathFragment[]createFragmentArray(soot.SootField[] fields, soot.Type[] fieldTypes, ContainerContext[][] contexts) Creates a sequence of access path fragments from an array of fields and field typesbooleanbooleanGets the context in which the access path is tainted, ornullif the access path is tainted in all contextssoot.SootFieldgetField()Gets the field referenced by this access path fragmentsoot.TypeGets the propagated type of the field referenced by this access path fragment.booleaninthashCode()intbooleanisValid()Gets whether this access path fragment is validtoString()
-
Constructor Details
-
AccessPathFragment
public AccessPathFragment(soot.SootField field) Creates a newAccessPathFragmentwithout a context and using the fields type- Parameters:
field- The field that is dereferenced
-
AccessPathFragment
public AccessPathFragment(soot.SootField field, soot.Type fieldType) Creates a newAccessPathFragmentwithout a context- Parameters:
field- The field that is dereferencedfieldType- The propagated type of the field that is dereferenced
-
AccessPathFragment
Creates a newAccessPathFragmentwith a specific context- Parameters:
field- The field that is dereferencedfieldType- The propagated type of the field that is dereferencedcontext- The context under which the access path is tainted
-
-
Method Details
-
getField
public soot.SootField getField()Gets the field referenced by this access path fragment- Returns:
- The field referenced by this access path fragment
-
getFieldType
public soot.Type getFieldType()Gets the propagated type of the field referenced by this access path fragment. If no type information has been propagated, the declared type is used.- Returns:
- The propagated type of the field referenced by this access path fragment
-
getContext
Gets the context in which the access path is tainted, ornullif the access path is tainted in all contexts- Returns:
- The context in which the access path is tainted
-
hasContext
public boolean hasContext() -
toString
-
isValid
public boolean isValid()Gets whether this access path fragment is valid- Returns:
- True if this access path fragment is valid, false otherwise
-
createFragmentArray
public static AccessPathFragment[] createFragmentArray(soot.SootField[] fields, soot.Type[] fieldTypes, ContainerContext[][] contexts) Creates a sequence of access path fragments from an array of fields and field types- Parameters:
fields- A sequence of field dereferencesfieldTypes- The types of the fields in the sequence of dereferences- Returns:
- The sequence of access path fragments
-
hashCode
public int hashCode() -
hashCodeWithoutContext
public int hashCodeWithoutContext() -
equals
-
equalsWithoutContext
-
copyWithNewType
Copies this access path fragment with a new propagated type. All other data is kept as-is.- Parameters:
newType- The new type- Returns:
- The new access path fragment
-
copyWithNewContext
-