public String getName(int constantIndex) { try { return ((NameAndTypeConstant)constantPool[constantIndex]).getName(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected NameAndTypeConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public String getName(int constantIndex) { try { return ((NameAndTypeConstant)constantPool[constantIndex]).getName(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected NameAndTypeConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { NameAndTypeConstant otherNameAndTypeConstant = (NameAndTypeConstant)otherConstant; result = (nameAndTypeConstant.getName(clazz) + ' ' + nameAndTypeConstant.getType(clazz)) .compareTo (otherNameAndTypeConstant.getName(clazz) + ' ' + otherNameAndTypeConstant.getType(clazz)); }
public String getName(int constantIndex) { try { return ((NameAndTypeConstant)constantPool[constantIndex]).getName(this); } catch (ClassCastException ex) { throw new ClassCastException("Expected NameAndTypeConstant at index ["+constantIndex+"] in class ["+getName()+"], found ["+ex.getMessage()+"]"); } }
public String getName(int constantIndex) { try { return ((NameAndTypeConstant)constantPool[constantIndex]).getName(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected NameAndTypeConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { NameAndTypeConstant otherNameAndTypeConstant = (NameAndTypeConstant)otherConstant; result = compare(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz), otherNameAndTypeConstant.getName(clazz), otherNameAndTypeConstant.getType(clazz)); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { NameAndTypeConstant otherNameAndTypeConstant = (NameAndTypeConstant)otherConstant; result = compare(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz), otherNameAndTypeConstant.getName(clazz), otherNameAndTypeConstant.getType(clazz)); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { NameAndTypeConstant otherNameAndTypeConstant = (NameAndTypeConstant)otherConstant; result = compare(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz), otherNameAndTypeConstant.getName(clazz), otherNameAndTypeConstant.getType(clazz)); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { constantIndex = constantPoolEditor.addNameAndTypeConstant(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { constantIndex = constantPoolEditor.addNameAndTypeConstant(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { constantIndex = constantPoolEditor.addNameAndTypeConstant(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { constantIndex = constantPoolEditor.addNameAndTypeConstant(nameAndTypeConstant.getName(clazz), nameAndTypeConstant.getType(clazz)); } }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { println(visitorInfo(nameAndTypeConstant) + " NameAndType [" + nameAndTypeConstant.getName(clazz) + " " + nameAndTypeConstant.getType(clazz) + "]"); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { println(visitorInfo(nameAndTypeConstant) + " NameAndType [" + nameAndTypeConstant.getName(clazz) + " " + nameAndTypeConstant.getType(clazz) + "]"); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { println(visitorInfo(nameAndTypeConstant) + " NameAndType [" + nameAndTypeConstant.getName(clazz) + " " + nameAndTypeConstant.getType(clazz) + "]"); }
/** * Finds or creates a NameAndTypeConstant constant pool entry with the given * name and type. * @return the constant pool index of the NameAndTypeConstant. */ public int addNameAndTypeConstant(String name, String type) { int constantPoolCount = targetClass.u2constantPoolCount; Constant[] constantPool = targetClass.constantPool; // Check if the entry already exists. for (int index = 1; index < constantPoolCount; index++) { Constant constant = constantPool[index]; if (constant != null && constant.getTag() == ClassConstants.CONSTANT_NameAndType) { NameAndTypeConstant nameAndTypeConstant = (NameAndTypeConstant)constant; if (nameAndTypeConstant.getName(targetClass).equals(name) && nameAndTypeConstant.getType(targetClass).equals(type)) { return index; } } } return addConstant(new NameAndTypeConstant(addUtf8Constant(name), addUtf8Constant(type))); }
/** * Finds or creates a NameAndTypeConstant constant pool entry with the given * name and type. * @return the constant pool index of the NameAndTypeConstant. */ public int addNameAndTypeConstant(String name, String type) { int constantPoolCount = targetClass.u2constantPoolCount; Constant[] constantPool = targetClass.constantPool; // Check if the entry already exists. for (int index = 1; index < constantPoolCount; index++) { Constant constant = constantPool[index]; if (constant != null && constant.getTag() == ClassConstants.CONSTANT_NameAndType) { NameAndTypeConstant nameAndTypeConstant = (NameAndTypeConstant)constant; if (nameAndTypeConstant.u2nameIndex < constantPoolCount && nameAndTypeConstant.u2descriptorIndex < constantPoolCount && nameAndTypeConstant.getName(targetClass).equals(name) && nameAndTypeConstant.getType(targetClass).equals(type)) { return index; } } } return addConstant(new NameAndTypeConstant(addUtf8Constant(name), addUtf8Constant(type))); }
/** * Finds or creates a NameAndTypeConstant constant pool entry with the given * name and type. * @return the constant pool index of the NameAndTypeConstant. */ public int addNameAndTypeConstant(String name, String type) { int constantPoolCount = targetClass.u2constantPoolCount; Constant[] constantPool = targetClass.constantPool; // Check if the entry already exists. for (int index = 1; index < constantPoolCount; index++) { Constant constant = constantPool[index]; if (constant != null && constant.getTag() == ClassConstants.CONSTANT_NameAndType) { NameAndTypeConstant nameAndTypeConstant = (NameAndTypeConstant)constant; if (nameAndTypeConstant.u2nameIndex < constantPoolCount && nameAndTypeConstant.u2descriptorIndex < constantPoolCount && nameAndTypeConstant.getName(targetClass).equals(name) && nameAndTypeConstant.getType(targetClass).equals(type)) { return index; } } } return addConstant(new NameAndTypeConstant(addUtf8Constant(name), addUtf8Constant(type))); }
/** * Finds or creates a NameAndTypeConstant constant pool entry with the given * name and type. * @return the constant pool index of the NameAndTypeConstant. */ public int addNameAndTypeConstant(String name, String type) { int constantPoolCount = targetClass.u2constantPoolCount; Constant[] constantPool = targetClass.constantPool; // Check if the entry already exists. for (int index = 1; index < constantPoolCount; index++) { Constant constant = constantPool[index]; if (constant != null && constant.getTag() == ClassConstants.CONSTANT_NameAndType) { NameAndTypeConstant nameAndTypeConstant = (NameAndTypeConstant)constant; if (nameAndTypeConstant.u2nameIndex < constantPoolCount && nameAndTypeConstant.u2descriptorIndex < constantPoolCount && nameAndTypeConstant.getName(targetClass).equals(name) && nameAndTypeConstant.getType(targetClass).equals(type)) { return index; } } } return addConstant(new NameAndTypeConstant(addUtf8Constant(name), addUtf8Constant(type))); }