Package daikon.chicory
Class FieldInfo
- Object
-
- DaikonVariableInfo
-
- FieldInfo
-
- All Implemented Interfaces:
Comparable<DaikonVariableInfo>
,Iterable<DaikonVariableInfo>
public class FieldInfo extends DaikonVariableInfo
The OjbectInfo class is a subtype of DaikonVariableInfo used for variable types which are class fields.
-
-
Field Summary
Fields Modifier and Type Field Description @MonotonicNonNull DCRuntime.FieldTag
field_tag
Class that gets the tags for fields.-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get_field_num()
@Nullable String
get_relative_name()
Returns the name of this field.Field
get_tag_field(String tag_field_name, Class<?> parent_class)
EnumSet<VarFlags>
get_var_flags()
Static final fields are NOMOD.VarKind
get_var_kind()
Returns the kind of this variable.Field
getField()
Object
getMyValFromParentVal(Object val)
Given a value corresponding to the parent of this, return the value of this.Class<?>
getType()
boolean
isFinal()
Returns true iff the corresponding field is final.boolean
isPrimitive()
boolean
isStatic()
Returns true iff the corresponding field is static.static int
num_prim_fields(Class<?> clazz)
Return the number of primitive fields in clazz and all of its superclasses.-
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, getDTraceValueString, getName, getRepName, getRepTypeName, getRepTypeNameOnly, getTypeName, getTypeNameOnly, getValueStringOfList, getValueStringOfObjectWithMod, implementsList, isArray, isFieldVisible, isHashcode, isHashcodeArray, isInt, 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
-
-
-
-
Field Detail
-
field_tag
public @MonotonicNonNull DCRuntime.FieldTag field_tag
Class that gets the tags for fields. Used by DynComp. Accessed only by methods DCRuntime.get_field_tag and DCRuntime.get_field_tag_refs_only.
-
-
Method Detail
-
num_prim_fields
public static int num_prim_fields(Class<?> clazz)
Return the number of primitive fields in clazz and all of its superclasses.
-
isStatic
@Pure public boolean isStatic()
Returns true iff the corresponding field is static.- Overrides:
isStatic
in classDaikonVariableInfo
-
isFinal
@Pure public boolean isFinal()
Returns true iff the corresponding field is final.
-
getMyValFromParentVal
public 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_field_num
public int get_field_num()
-
isPrimitive
@Pure public boolean isPrimitive()
-
get_tag_field
public Field get_tag_field(String tag_field_name, Class<?> parent_class)
-
get_var_kind
public VarKind get_var_kind()
Returns the kind of this variable. Statics are top level variables, instance variables are fields.- Specified by:
get_var_kind
in classDaikonVariableInfo
-
get_relative_name
public @Nullable String get_relative_name()
Returns the name of this field. Since statics are top level, they have no relative name. Fields return their field name.- Overrides:
get_relative_name
in classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Static final fields are NOMOD.- Overrides:
get_var_flags
in classDaikonVariableInfo
-
-