Package daikon.chicory
Class DaikonClassInfo
- Object
-
- DaikonVariableInfo
-
- DaikonClassInfo
-
- All Implemented Interfaces:
Comparable<DaikonVariableInfo>,Iterable<DaikonVariableInfo>
public class DaikonClassInfo extends DaikonVariableInfo
The DaikonClassInfo class is a subtype of DaikonVariableInfo used for variables which represent the run-time type of a variable. They will have a VarType of CLASSNAME and their VarInfoName will end with the class_suffix: ".getClass().getName()".
-
-
Field Summary
-
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 DaikonClassInfo(String theName, String typeName, String repTypeName, String function_args, boolean isArr)Constructs a DaikonClassInfo object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget_relative_name()Returns the name of this field.EnumSet<VarFlags>get_var_flags()Returns the variable flags for this variable.VarKindget_var_kind()Returns function since essentially this is a call to a pure function.StringgetDTraceValueString(Object val)Returns a String representation of this object suitable for a.dtracefile.ObjectgetMyValFromParentVal(Object value)Given a value corresponding to the parent of this, return the value of this.StringgetValueStringNonArr(Object val)Get a String representation of the given Object's run-time type and the corresponding "modified" value.-
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, getCompareString, 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
-
DaikonClassInfo
public DaikonClassInfo(String theName, String typeName, String repTypeName, String function_args, boolean isArr)
Constructs a DaikonClassInfo object.- Parameters:
theName- the name of the variabletypeName- the name of the typerepTypeName- the name of the representation typefunction_args- arguments used to create a functionisArr- true iff the variable represents an array of run-time classes
-
-
Method Detail
-
getMyValFromParentVal
public Object getMyValFromParentVal(Object value)
Description copied from class:DaikonVariableInfoGiven 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:
getMyValFromParentValin classDaikonVariableInfo- Parameters:
value- the parent object. Can be null for static fields.- Returns:
- the value for this, computed from
parentVal
-
getDTraceValueString
public String getDTraceValueString(Object val)
Description copied from class:DaikonVariableInfoReturns a String representation of this object suitable for a.dtracefile.- Overrides:
getDTraceValueStringin classDaikonVariableInfo- Parameters:
val- the object whose value to print
-
getValueStringNonArr
public String getValueStringNonArr(Object val)
Get a String representation of the given Object's run-time type and the corresponding "modified" value.- Parameters:
val- the Object whose run-time class we wish to get a String representation of- Returns:
- string representation (suitable for a
.dtracefile) of the given Object's run-time type, and the "modified" value (modbit)
-
get_var_kind
public VarKind get_var_kind()
Returns function since essentially this is a call to a pure function.- Specified by:
get_var_kindin classDaikonVariableInfo
-
get_relative_name
public String get_relative_name()
Returns the name of this field.- Overrides:
get_relative_namein classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Description copied from class:DaikonVariableInfoReturns the variable flags for this variable. Subclasses should call super(), then add in any flags that they add.- Overrides:
get_var_flagsin classDaikonVariableInfo
-
-