/** * Set the field this instruction operates on. * * @return this instruction, for method chaining */ public FieldInstruction setField(Field field) { if (field == null) return setFieldIndex(0); return setField(field.getDeclaringClass(), field.getName(), field.getType()); }
void read(DataInput in) throws IOException { super.read(in); setFieldIndex(in.readUnsignedShort()); }
/** * Set the field this instruction operates on. * * @return this instruction, for method chaining */ public FieldInstruction setField(Field field) { if (field == null) return setFieldIndex(0); return setField(field.getDeclaringClass(), field.getName(), field.getType()); }
void read(DataInput in) throws IOException { super.read(in); setFieldIndex(in.readUnsignedShort()); }
/** * Set the field this instruction operates on. * * @return this instruction, for method chaining */ public FieldInstruction setField(BCField field) { if (field == null) return setFieldIndex(0); return setField(field.getDeclarer().getName(), field.getName(), field.getTypeName()); }
/** * Set the field this instruction operates on. * * @return this instruction, for method chaining */ public FieldInstruction setField(BCField field) { if (field == null) return setFieldIndex(0); return setField(field.getDeclarer().getName(), field.getName(), field.getTypeName()); }
/** * Set the field this instruction operates on. * * @param dec the full class name of the field's declaring class * @param name the field name * @param type the full class name of the field type * @return this instruction, for method chaining */ public FieldInstruction setField(String dec, String name, String type) { if (dec == null && name == null && type == null) return setFieldIndex(0); if (dec == null) dec = ""; if (name == null) name = ""; if (type == null) type = ""; dec = getProject().getNameCache().getInternalForm(dec, false); type = getProject().getNameCache().getInternalForm(type, true); return setFieldIndex(getPool().findFieldEntry(dec, name, type, true)); }
/** * Set the field this instruction operates on. * * @param dec the full class name of the field's declaring class * @param name the field name * @param type the full class name of the field type * @return this instruction, for method chaining */ public FieldInstruction setField(String dec, String name, String type) { if (dec == null && name == null && type == null) return setFieldIndex(0); if (dec == null) dec = ""; if (name == null) name = ""; if (type == null) type = ""; dec = getProject().getNameCache().getInternalForm(dec, false); type = getProject().getNameCache().getInternalForm(type, true); return setFieldIndex(getPool().findFieldEntry(dec, name, type, true)); }