Package daikon.chicory
Class ParameterInfo
- Object
-
- DaikonVariableInfo
-
- ParameterInfo
-
- All Implemented Interfaces:
Comparable<DaikonVariableInfo>
,Iterable<DaikonVariableInfo>
public class ParameterInfo extends DaikonVariableInfo
The ParameterInfo class is a subtype of DaikonVariableInfo used for variable types which are arguments to procedures.This class takes "precedence" over when a seeming conflict could arise. For instance, consider: public static sort(int array[]). Is the "array" parameter represented as an ParameterInfo object or an ArrayInfo object? Because ParameterInfo takes precedence, it is the former. This makes sense because the arrays are really treated as hash codes at the first level, so such a parameter needs no array-specific processing (at this level of the tree at least).
-
-
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 ParameterInfo(MethodInfo mi, int theArgNum, int param_offset)
Constructs a PamterInfo object with the name/type specified for this the specified argument number in mi.ParameterInfo(String theName, int theArgNum, Class<?> argType, int param_offset)
Constructs an ParameterInfo object with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get_param_offset()
Returns the offset in the local table for this parameter.EnumSet<VarFlags>
get_var_flags()
Add IS_PARM to list of variable flags.VarKind
get_var_kind()
Parameters are not enclosed in other variable, so they are of kind VARIABLE.int
getArgNum()
Returns the argument number for this parameter.Object
getMyValFromParentVal(Object value)
Given a value corresponding to the parent of this, return the value of this.Class<?>
getType()
boolean
isPrimitive()
Returns whether or not this parameter is a primitive type.-
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
-
ParameterInfo
public ParameterInfo(String theName, int theArgNum, Class<?> argType, int param_offset)
Constructs an ParameterInfo object with the specified name.- Parameters:
theName
- the variable name (used in the declaration)
-
ParameterInfo
public ParameterInfo(MethodInfo mi, int theArgNum, int param_offset)
Constructs a PamterInfo object with the name/type specified for this the specified argument number in mi.
-
-
Method Detail
-
getArgNum
public int getArgNum()
Returns the argument number for this parameter.
-
get_param_offset
public int get_param_offset()
Returns the offset in the local table for this parameter.
-
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
-
isPrimitive
@Pure public boolean isPrimitive()
Returns whether or not this parameter is a primitive type.
-
get_var_kind
public VarKind get_var_kind()
Parameters are not enclosed in other variable, so they are of kind VARIABLE.- Specified by:
get_var_kind
in classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Add IS_PARM to list of variable flags.- Overrides:
get_var_flags
in classDaikonVariableInfo
-
-