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 String
get_relative_name()
Returns the name of this field.EnumSet<VarFlags>
get_var_flags()
Returns the variable flags for this variable.VarKind
get_var_kind()
Returns function since essentially this is a call to a pure function.String
getDTraceValueString(Object val)
Returns a String representation of this object suitable for a.dtrace
file.Object
getMyValFromParentVal(Object value)
Given a value corresponding to the parent of this, return the value of this.String
getValueStringNonArr(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: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:
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:DaikonVariableInfo
Returns a String representation of this object suitable for a.dtrace
file.- Overrides:
getDTraceValueString
in 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
.dtrace
file) 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_kind
in classDaikonVariableInfo
-
get_relative_name
public String get_relative_name()
Returns the name of this field.- Overrides:
get_relative_name
in classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Description copied from class:DaikonVariableInfo
Returns the variable flags for this variable. Subclasses should call super(), then add in any flags that they add.- Overrides:
get_var_flags
in classDaikonVariableInfo
-
-