Package daikon.chicory
Class StringInfo
- Object
-
- DaikonVariableInfo
-
- StringInfo
-
- All Implemented Interfaces:
Comparable<DaikonVariableInfo>
,Iterable<DaikonVariableInfo>
public class StringInfo extends DaikonVariableInfo
The StringInfo class is a subtype of DaikonVariableInfo used for variable types that can be converted into strings (.toString()).
-
-
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 StringInfo(String theName, String typeName, String repTypeName, String receiverName, boolean arr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get_relative_name()
Returns the name of this function.EnumSet<VarFlags>
get_var_flags()
Returns the variable flags for this variable.VarKind
get_var_kind()
toString is a functionString
getDTraceValueString(Object val)
Returns a String that contains a string representation of val, used for dtrace information.Object
getMyValFromParentVal(Object value)
Given a value corresponding to the parent of this, return the value of this.static String
getStringList(List<?> theValues)
Returns a space-separated String of the elements in theValues.String
getValueStringNonArr(Object val)
Similar to showStringList, but used for non-array objects.-
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
-
StringInfo
public StringInfo(String theName, String typeName, String repTypeName, String receiverName, boolean arr)
-
-
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)
Returns a String that contains a string representation of val, used for dtrace information.- Overrides:
getDTraceValueString
in classDaikonVariableInfo
- Parameters:
val
- the object whose value to print
-
getStringList
public static String getStringList(List<?> theValues)
Returns a space-separated String of the elements in theValues. If theValues is null, returns "null." If theValues is nonsensical, returns "nonsensical".- Parameters:
theValues
- a list of values, each is a String or NonsensicalObject or NonsensicalList- Returns:
- a space-separated String of the elements in theValues
-
getValueStringNonArr
public String getValueStringNonArr(Object val)
Similar to showStringList, but used for non-array objects.
-
get_var_kind
public VarKind get_var_kind()
toString is a function- Specified by:
get_var_kind
in classDaikonVariableInfo
-
get_relative_name
public String get_relative_name()
Returns the name of this function.- 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
-
-