1 18 package org.apache.geronimo.interop.rmi.iiop; 19 20 import org.apache.geronimo.interop.util.SystemUtil; 21 22 import java.lang.reflect.Field ; 23 24 public abstract class FinalFieldSetter 25 { 26 private static final boolean JDK14 = SystemUtil.isJDK14(); 27 28 public static FinalFieldSetter getInstance(Field f) 29 { 30 if(JDK14) 31 { 32 return new FinalFieldSetterJdk14(f); 33 } 34 else 35 { 36 throw new RuntimeException ("FinalFieldSetter is not implemented for jdk version: " + 37 SystemUtil.getVmVersion()); 38 } 39 } 40 41 public abstract void setBoolean(Object that, boolean value); 42 public abstract void setByte(Object that, byte value); 43 public abstract void setChar(Object that, char value); 44 public abstract void setDouble(Object that, double value); 45 public abstract void setFloat(Object that, float value); 46 public abstract void setInt(Object that, int value); 47 public abstract void setLong(Object that, long value); 48 public abstract void setShort(Object that, short value); 49 public abstract void set(Object that, Object value); 50 } 51 | Popular Tags |