Class MockObj
java.lang.Object
pascal.taie.analysis.pta.core.heap.Obj
pascal.taie.analysis.pta.core.heap.MockObj
- All Implemented Interfaces:
Indexable
Represents the objects whose allocation sites are not explicitly
written in the program.
-
Constructor Summary
ConstructorDescriptionMockObj
(Descriptor desc, Object alloc, Type type, JMethod container, boolean isFunctional) -
Method Summary
-
Constructor Details
-
MockObj
-
-
Method Details
-
getDescriptor
-
getType
-
getAllocation
- Specified by:
getAllocation
in classObj
- Returns:
- the allocation of the object.
-
getContainerMethod
- Specified by:
getContainerMethod
in classObj
- Returns:
- the method containing the allocation site of this object. For some special objects, e.g., string constants, which are not allocated in any method, this API returns an empty Optional.
-
getContainerType
Description copied from class:Obj
This method is useful for type sensitivity.- Specified by:
getContainerType
in classObj
- Returns:
- the type containing the allocation site of this object. For special objects, the return values of this method are also special.
-
isFunctional
public boolean isFunctional()Description copied from class:Obj
An object is functional means that it can hold fields (or array indexes).- Overrides:
isFunctional
in classObj
- Returns:
true
if this is a functionObj
.
-
equals
-
hashCode
public int hashCode() -
toString
-