1 cananian 1.1.4.1 // HFieldMutator.java, created Mon Jan 10 20:05:22 2000 by cananian 2 cananian 1.1.4.2 // Copyright (C) 2000 C. Scott Ananian <cananian@alumni.princeton.edu> 3 cananian 1.1.4.1 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 cananian 1.1.4.1 package harpoon.ClassFile; 5 cananian 1.1.4.1 6 cananian 1.1.4.1 /** 7 cananian 1.1.4.1 * <code>HFieldMutator</code> allows you to change properties of 8 cananian 1.1.4.1 * an <code>HField</code>. 9 cananian 1.1.4.1 * @see HField#getMutator 10 cananian 1.1.4.1 * 11 cananian 1.1.4.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 12 cananian 1.2 * @version $Id: HFieldMutator.java,v 1.2 2002/02/25 21:03:03 cananian Exp $ 13 cananian 1.1.4.1 */ 14 cananian 1.1.4.1 public interface HFieldMutator { 15 cananian 1.1.4.3 /** Add the modifiers specified by <code>m</code> to the field. 16 cananian 1.1.4.3 * The <code>java.lang.reflect.Modifier</code> class should be used 17 cananian 1.1.4.3 * to encode the modifiers. 18 cananian 1.1.4.3 * @see java.lang.reflect.Modifier */ 19 cananian 1.1.4.1 public void addModifiers(int m); 20 cananian 1.1.4.3 /** Set the field's modifiers to those specified by <code>m</code>. 21 cananian 1.1.4.3 * The <code>java.lang.reflect.Modifier</code> class should be used 22 cananian 1.1.4.3 * to encode the modifiers. 23 cananian 1.1.4.3 * @see java.lang.reflect.Modifier */ 24 cananian 1.1.4.1 public void setModifiers(int m); 25 cananian 1.1.4.3 /** Remove the modifiers specified by <code>m</code> from the field. 26 cananian 1.1.4.3 * The <code>java.lang.reflect.Modifier</code> class should be used 27 cananian 1.1.4.3 * to encode the modifiers. 28 cananian 1.1.4.3 * @see java.lang.reflect.Modifier */ 29 cananian 1.1.4.1 public void removeModifiers(int m); 30 cananian 1.1.4.1 31 cananian 1.1.4.3 /** Set the type of this field to <code>type</code>. */ 32 cananian 1.1.4.1 public void setType(HClass type); 33 cananian 1.1.4.3 /** Mark this field as constant with the constant value given 34 cananian 1.1.4.3 * by <code>co</code>. */ 35 cananian 1.1.4.1 public void setConstant(Object co); 36 cananian 1.1.4.3 /** Set the 'synthetic' property of this field. */ 37 cananian 1.1.4.1 public void setSynthetic(boolean isSynthetic); 38 cananian 1.2 }