ある定義がほかの定義によって隠されることをいうプログラミング用語。
たとえばJavaの場合、親クラスで定義されたフィールドと同名のフィールドを定義した場合、子側のフィールドで親側の定義が隠されてしまう。
public class Test { public String field = "Test"; } public class TestEx extends Test { /** フィールドのハイディング */ public int field = 3; } public class Main { public static void main(String[] args) { TestEx testEx = new TestEx(); // ハイディングによりTestExで定義されたint型のfieldが見える int fieldEx = testEx.field; Test test = testEx; // 親の型に入れ替えるとTestで定義されたString型のfieldが見える String field = test.field; } }
「ハイディ」の誤爆回避用。