001package daikon.chicory; 002 003import org.checkerframework.checker.nullness.qual.Nullable; 004 005/** 006 * The StaticObjInfo class is a subtype of DaikonVariableInfo used as a root for static variables 007 * within a class (which are the only variables visible to static methods). Nothing is printed for 008 * this variable in either the decl or dtrace file, it exists only so that the static variables of a 009 * class can be nested within it and not directly under the root. 010 */ 011public class StaticObjInfo extends DaikonVariableInfo { 012 /** The type of this variable. */ 013 public Class<?> type; 014 015 /** 016 * Create a new StaticObjInfo. 017 * 018 * @param type the variable's type 019 */ 020 public StaticObjInfo(Class<?> type) { 021 super("this", type.getName(), getRepName(type, false)); 022 this.type = type; 023 } 024 025 // See daikon.chicory.DaikonVariableInfo#getChildValue(java.lang.Object) 026 @Override 027 public @Nullable Object getMyValFromParentVal(Object val) { 028 return null; 029 } 030 031 /** {@code this} is a top level variable. */ 032 @Override 033 public VarKind get_var_kind() { 034 return VarKind.VARIABLE; 035 } 036}