/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public String getMethodDeclarerName() { if (_index == 0) return null; String name = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { // InvokeDynamic doesn't hvae a method declarer, but it does have a bootstrap index. InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); name = String.valueOf(ide.getBootstrapMethodAttrIndex()); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); name = getProject().getNameCache().getExternalForm (entry.getClassEntry().getNameEntry().getValue(), false); } if (name.length() == 0) return null; return name; }
/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public String getMethodDeclarerName() { if (_index == 0) return null; String name = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { // InvokeDynamic doesn't hvae a method declarer, but it does have a bootstrap index. InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); name = String.valueOf(ide.getBootstrapMethodAttrIndex()); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); name = getProject().getNameCache().getExternalForm (entry.getClassEntry().getNameEntry().getValue(), false); } if (name.length() == 0) return null; return name; }
/** * Return the name of the method this instruction operates on, or null * if not set. */ public String getMethodName() { if (_index == 0) return null; String name = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); name = ide.getNameAndTypeEntry().getNameEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); name = entry.getNameAndTypeEntry().getNameEntry().getValue(); } if (name.length() == 0) { name = null; } return name; }
/** * Return the name of the method this instruction operates on, or null * if not set. */ public String getMethodName() { if (_index == 0) return null; String name = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); name = ide.getNameAndTypeEntry().getNameEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); name = entry.getNameAndTypeEntry().getNameEntry().getValue(); } if (name.length() == 0) { name = null; } return name; }
/** * Return the return type of the method this instruction operates on, * or null if not set. */ public String getMethodReturnName() { if (_index == 0) return null; String desc = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); desc = ide.getNameAndTypeEntry().getDescriptorEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); desc = entry.getNameAndTypeEntry().getDescriptorEntry().getValue(); } NameCache cache = getProject().getNameCache(); String name = cache.getExternalForm(cache.getDescriptorReturnName(desc), false); if (name.length() == 0) return null; return name; }
return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name, desc, true)); if (getOpcode() == Constants.INVOKEDYNAMIC) { int bootstrapindex = Integer.parseInt(dec); // Dec represents the bootstrap index return setMethodIndex(getPool().findInvokeDynamicEntry(bootstrapindex, name, desc, true)); return setMethodIndex(getPool().findMethodEntry(dec, name, desc, true));
return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name, desc, true)); if (getOpcode() == Constants.INVOKEDYNAMIC) { int bootstrapindex = Integer.parseInt(dec); // Dec represents the bootstrap index return setMethodIndex(getPool().findInvokeDynamicEntry(bootstrapindex, name, desc, true)); return setMethodIndex(getPool().findMethodEntry(dec, name, desc, true));
/** * Return the return type of the method this instruction operates on, * or null if not set. */ public String getMethodReturnName() { if (_index == 0) return null; String desc = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); desc = ide.getNameAndTypeEntry().getDescriptorEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); desc = entry.getNameAndTypeEntry().getDescriptorEntry().getValue(); } NameCache cache = getProject().getNameCache(); String name = cache.getExternalForm(cache.getDescriptorReturnName(desc), false); if (name.length() == 0) return null; return name; }
/** * Return the param types of the method this instruction operates on, * or empty array if none. */ public String[] getMethodParamNames() { if (_index == 0) return new String[0]; String desc = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); desc = ide.getNameAndTypeEntry().getDescriptorEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); desc = entry.getNameAndTypeEntry().getDescriptorEntry(). getValue(); } NameCache cache = getProject().getNameCache(); String[] names = cache.getDescriptorParamNames(desc); for (int i = 0; i < names.length; i++) names[i] = cache.getExternalForm(names[i], false); return names; }
/** * Return the param types of the method this instruction operates on, * or empty array if none. */ public String[] getMethodParamNames() { if (_index == 0) return new String[0]; String desc = null; if (getOpcode() == Constants.INVOKEDYNAMIC) { InvokeDynamicEntry ide = (InvokeDynamicEntry) getPool().getEntry(_index); desc = ide.getNameAndTypeEntry().getDescriptorEntry().getValue(); } else { ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index); desc = entry.getNameAndTypeEntry().getDescriptorEntry(). getValue(); } NameCache cache = getProject().getNameCache(); String[] names = cache.getDescriptorParamNames(desc); for (int i = 0; i < names.length; i++) names[i] = cache.getExternalForm(names[i], false); return names; }