Package daikon.chicory
Class ThisObjInfo
- Object
-
- DaikonVariableInfo
-
- ThisObjInfo
-
- All Implemented Interfaces:
Comparable<DaikonVariableInfo>
,Iterable<DaikonVariableInfo>
public class ThisObjInfo extends DaikonVariableInfo
The ThisObjInfo class is a subtype of DaikonVariableInfo used for variable types which represent the "this" object.
-
-
Field Summary
Fields Modifier and Type Field Description Class<?>
type
-
Fields inherited from class DaikonVariableInfo
children, class_suffix, class_suffix_relative_name, classClassName, compareInfoString, declShouldPrint, dkconfig_constant_infer, dtraceShouldPrint, dtraceShouldPrintChildren, isArray, isNonNullParamString, isNonNullString, isParamString, ppt_statics, repTypeName, std_visibility, stringClassName, typeName
-
-
Constructor Summary
Constructors Constructor Description ThisObjInfo(Class<?> type)
ThisObjInfo(String thisName, Class<?> type)
thisName is the name to be used to specify the variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumSet<VarFlags>
get_var_flags()
Add IS_PARAM to list of variable flags, because the receiver "this" is a formal parameter.VarKind
get_var_kind()
'this' is a top level variable@Nullable Object
getMyValFromParentVal(Object val)
Given a value corresponding to the parent of this, return the value of this.-
Methods inherited from class DaikonVariableInfo
addChild, addChildNodes, addClassVars, addDeclVar, addParamDeclVar, addParameters, addPureMethodDecl, array_child, checkForDerivedVariables, checkForListDecl, checkForRuntimeClass, compareTo, declShouldPrint, dTraceShouldPrint, dTraceShouldPrintChildren, get_const_val, get_function_args, get_relative_name, getCompareString, getDTraceValueString, getName, getRepName, getRepTypeName, getRepTypeNameOnly, getTypeName, getTypeNameOnly, getValueStringOfList, getValueStringOfObjectWithMod, implementsList, isArray, isFieldVisible, isHashcode, isHashcodeArray, isInt, isStatic, iterator, shouldAddRuntimeClass, stdClassName, systemClass, toString, tree_as_list, treeString
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ThisObjInfo
public ThisObjInfo(Class<?> type)
-
ThisObjInfo
public ThisObjInfo(String thisName, Class<?> type)
thisName is the name to be used to specify the variable. It's "this" except for outer classes, as in "OuterClass.this".
-
-
Method Detail
-
getMyValFromParentVal
public @Nullable Object getMyValFromParentVal(Object val)
Description copied from class:DaikonVariableInfo
Given a value corresponding to the parent of this, return the value of this.For instance, if the variable a has a field b, then calling getMyValFromParentVal(val_of_a) will return the value of a.b .
- Specified by:
getMyValFromParentVal
in classDaikonVariableInfo
- Parameters:
val
- the parent object. Can be null for static fields.- Returns:
- the value for this, computed from
parentVal
-
get_var_kind
public VarKind get_var_kind()
'this' is a top level variable- Specified by:
get_var_kind
in classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Add IS_PARAM to list of variable flags, because the receiver "this" is a formal parameter.- Overrides:
get_var_flags
in classDaikonVariableInfo
-
-