public void setInitValue( final float f ) { checkType(Type.FLOAT); if (f != 0.0) { value = new Float(f); } }
public void setInitValue(byte b) { checkType(Type.BYTE); if(b != 0) value = new Integer(b); }
public void setInitValue( final long l ) { checkType(Type.LONG); if (l != 0L) { value = Long.valueOf(l); } }
public void setInitValue( final short s ) { checkType(Type.SHORT); if (s != 0) { value = Integer.valueOf(s); } }
public void setInitValue(short s) { checkType(Type.SHORT); if(s != 0) value = new Integer(s); }
public void setInitValue(char c) { checkType(Type.CHAR); if(c != 0) value = new Integer(c); }
public void setInitValue(boolean b) { checkType(Type.BOOLEAN); if(b) value = new Integer(1); }
public void setInitValue( final int i ) { checkType(Type.INT); if (i != 0) { value = Integer.valueOf(i); } }
public void setInitValue( final double d ) { checkType(Type.DOUBLE); if (d != 0.0) { value = new Double(d); } }
public void setInitValue(long l) { checkType(Type.LONG); if(l != 0L) value = new Long(l); }
public void setInitValue(int i) { checkType(Type.INT); if(i != 0) value = new Integer(i); }
public void setInitValue(double d) { checkType(Type.DOUBLE); if(d != 0.0) value = new Double(d); }
public void setInitValue( final char c ) { checkType(Type.CHAR); if (c != 0) { value = Integer.valueOf(c); } }
public void setInitValue( final byte b ) { checkType(Type.BYTE); if (b != 0) { value = Integer.valueOf(b); } }
public void setInitValue( final boolean b ) { checkType(Type.BOOLEAN); if (b) { value = Integer.valueOf(1); } }
public void setInitValue(float f) { checkType(Type.FLOAT); if(f != 0.0) value = new Float(f); }
/** * Set (optional) initial value of field, otherwise it will be set to null/0/false * by the JVM automatically. */ public void setInitValue( final String str ) { checkType( ObjectType.getInstance("java.lang.String")); if (str != null) { value = str; } }
/** * Set (optional) initial value of field, otherwise it will be set to null/0/false * by the JVM automatically. */ public void setInitValue(String str) { checkType(new ObjectType("java.lang.String")); if(str != null) value = str; }
/** * Get field object after having set up all necessary values. */ public Field getField() { String signature = getSignature(); int name_index = cp.addUtf8(name); int signature_index = cp.addUtf8(signature); if(value != null) { checkType(type); int index = addConstant(); addAttribute(new ConstantValue(cp.addUtf8("ConstantValue"), 2, index, cp.getConstantPool())); } return new Field(access_flags, name_index, signature_index, getAttributes(), cp.getConstantPool()); }
/** * Get field object after having set up all necessary values. */ public Field getField() { final String signature = getSignature(); final int name_index = super.getConstantPool().addUtf8(super.getName()); final int signature_index = super.getConstantPool().addUtf8(signature); if (value != null) { checkType(super.getType()); final int index = addConstant(); addAttribute(new ConstantValue(super.getConstantPool().addUtf8("ConstantValue"), 2, index, super.getConstantPool().getConstantPool())); // sic } addAnnotationsAsAttribute(super.getConstantPool()); return new Field(super.getAccessFlags(), name_index, signature_index, getAttributes(), super.getConstantPool().getConstantPool()); // sic }