/** * Return the name of the field this instruction operates on, or null * if not set. */ public String getFieldName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = entry.getNameAndTypeEntry().getNameEntry().getValue(); if (name.length() == 0) return null; return name; }
/** * Return the name of the field this instruction operates on, or null * if not set. */ public String getFieldName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = entry.getNameAndTypeEntry().getNameEntry().getValue(); if (name.length() == 0) return null; return name; }
/** * Return the declaring class of the field this instruction operates on, * or null if not set. */ public String getFieldDeclarerName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = getProject().getNameCache().getExternalForm(entry. getClassEntry().getNameEntry().getValue(), false); if (name.length() == 0) return null; return name; }
/** * Return the type of the field this instruction operates on, or null * if not set. */ public String getFieldTypeName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = getProject().getNameCache().getExternalForm(entry. getNameAndTypeEntry().getDescriptorEntry().getValue(), false); if (name.length() == 0) return null; return name; }
/** * Return the type of the field this instruction operates on, or null * if not set. */ public String getFieldTypeName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = getProject().getNameCache().getExternalForm(entry. getNameAndTypeEntry().getDescriptorEntry().getValue(), false); if (name.length() == 0) return null; return name; }
/** * Return the declaring class of the field this instruction operates on, * or null if not set. */ public String getFieldDeclarerName() { int index = getFieldIndex(); if (index == 0) return null; ComplexEntry entry = (ComplexEntry) getPool().getEntry(index); String name = getProject().getNameCache().getExternalForm(entry. getClassEntry().getNameEntry().getValue(), false); if (name.length() == 0) return null; return name; }
/** * 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)); }