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.FieldTagfield_tagClass 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 intget_field_num()@Nullable Stringget_relative_name()Returns the name of this field.Fieldget_tag_field(String tag_field_name, Class<?> parent_class)EnumSet<VarFlags>get_var_flags()Static final fields are NOMOD.VarKindget_var_kind()Returns the kind of this variable.FieldgetField()ObjectgetMyValFromParentVal(Object val)Given a value corresponding to the parent of this, return the value of this.Class<?>getType()booleanisFinal()Returns true iff the corresponding field is final.booleanisPrimitive()booleanisStatic()Returns true iff the corresponding field is static.static intnum_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:
isStaticin classDaikonVariableInfo
-
isFinal
@Pure public boolean isFinal()
Returns true iff the corresponding field is final.
-
getMyValFromParentVal
public Object getMyValFromParentVal(Object val)
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:
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_kindin 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_namein classDaikonVariableInfo
-
get_var_flags
public EnumSet<VarFlags> get_var_flags()
Static final fields are NOMOD.- Overrides:
get_var_flagsin classDaikonVariableInfo
-
-