public String getRefType(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getType(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public String getRefType(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getType(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public String getRefType(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getType(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced constructor descriptor. if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { descriptor = refConstant.getType(clazz); refConstant.referencedMemberAccept(this); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced constructor descriptor. if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { descriptor = refConstant.getType(clazz); refConstant.referencedMemberAccept(this); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced constructor descriptor. if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { descriptor = refConstant.getType(clazz); refConstant.referencedMemberAccept(this); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant otherRefConstant = (RefConstant)otherConstant; result = (refConstant.getClassName(clazz) + ' ' + refConstant.getName(clazz) + ' ' + refConstant.getType(clazz)) .compareTo (otherRefConstant.getClassName(clazz) + ' ' + otherRefConstant.getName(clazz) + ' ' + otherRefConstant.getType(clazz)); }
private void debug(Clazz clazz, RefConstant refConstant, Clazz referencedClass, Member referencedMember) { System.out.println("MemberReferenceFixer:"); System.out.println(" Class file = "+clazz.getName()); System.out.println(" Ref class = "+referencedClass.getName()); System.out.println(" Ref member name = "+refConstant.getName(clazz)); System.out.println(" -> "+referencedMember.getName(referencedClass)); System.out.println(" Ref descriptor = "+refConstant.getType(clazz)); System.out.println(" -> "+referencedMember.getDescriptor(referencedClass)); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant otherRefConstant = (RefConstant)otherConstant; result = compare(refConstant.getClassName(clazz), refConstant.getName(clazz), refConstant.getType(clazz), otherRefConstant.getClassName(clazz), otherRefConstant.getName(clazz), otherRefConstant.getType(clazz)); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant otherRefConstant = (RefConstant)otherConstant; result = compare(refConstant.getClassName(clazz), refConstant.getName(clazz), refConstant.getType(clazz), otherRefConstant.getClassName(clazz), otherRefConstant.getName(clazz), otherRefConstant.getType(clazz)); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant otherRefConstant = (RefConstant)otherConstant; result = compare(refConstant.getClassName(clazz), refConstant.getName(clazz), refConstant.getType(clazz), otherRefConstant.getClassName(clazz), otherRefConstant.getName(clazz), otherRefConstant.getType(clazz)); }
private void visitRefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); parameterStackDelta = ClassUtil.internalMethodParameterSize(type); typeStackDelta = ClassUtil.internalTypeSize(ClassUtil.internalMethodReturnType(type)); }
private void debug(Clazz clazz, RefConstant refConstant, Clazz referencedClass, Member referencedMember) { System.out.println("MemberReferenceFixer:"); System.out.println(" ["+clazz.getName()+"]: ["+ refConstant.getClassName(clazz)+"."+refConstant.getName(clazz)+" "+refConstant.getType(clazz)+"] -> ["+ referencedClass.getName()+"."+referencedMember.getName(referencedClass)+" "+referencedMember.getDescriptor(referencedClass)+"]"); } }
private void debug(Clazz clazz, RefConstant refConstant, Clazz referencedClass, Member referencedMember) { System.out.println("MemberReferenceFixer:"); System.out.println(" ["+clazz.getName()+"]: ["+ refConstant.getClassName(clazz)+"."+refConstant.getName(clazz)+" "+refConstant.getType(clazz)+"] -> ["+ referencedClass.getName()+"."+referencedMember.getName(referencedClass)+" "+referencedMember.getDescriptor(referencedClass)+"]"); } }
private void debug(Clazz clazz, RefConstant refConstant, Clazz referencedClass, Member referencedMember) { System.out.println("MemberReferenceFixer:"); System.out.println(" ["+clazz.getName()+"]: ["+ refConstant.getClassName(clazz)+"."+refConstant.getName(clazz)+" "+refConstant.getType(clazz)+"] -> ["+ referencedClass.getName()+"."+referencedMember.getName(referencedClass)+" "+referencedMember.getDescriptor(referencedClass)+"]"); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { Clazz referencedClass = refConstant.referencedClass; Clazz newReferencedClass = updateReferencedClass(referencedClass); if (referencedClass != newReferencedClass) { // Change the referenced class. refConstant.referencedClass = newReferencedClass; // Change the referenced class member. refConstant.referencedMember = updateReferencedMember(refConstant.referencedMember, refConstant.getName(clazz), refConstant.getType(clazz), newReferencedClass); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); // Count the number of parameters. int parameterCount = ClassUtil.internalMethodParameterCount(type); if (!isStatic) { parameterCount++; } // Pop the parameters and the class reference, in reverse order. for (int parameterIndex = parameterCount-1; parameterIndex >= 0; parameterIndex--) { setMethodParameterValue(clazz, methodrefConstant, parameterIndex, stack.pop()); } // Push the return value, if applicable. String returnType = ClassUtil.internalMethodReturnType(type); if (returnType.charAt(0) != ClassConstants.TYPE_VOID) { stack.push(getMethodReturnValue(clazz, methodrefConstant, returnType)); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); // Count the number of parameters. int parameterCount = ClassUtil.internalMethodParameterCount(type); if (!isStatic) { parameterCount++; } // Pop the parameters and the class reference, in reverse order. for (int parameterIndex = parameterCount-1; parameterIndex >= 0; parameterIndex--) { setMethodParameterValue(clazz, methodrefConstant, parameterIndex, stack.pop()); } // Push the return value, if applicable. String returnType = ClassUtil.internalMethodReturnType(type); if (returnType.charAt(0) != ClassConstants.INTERNAL_TYPE_VOID) { stack.push(getMethodReturnValue(clazz, methodrefConstant, returnType)); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); // Count the number of parameters. int parameterCount = ClassUtil.internalMethodParameterCount(type); if (!isStatic) { parameterCount++; } // Pop the parameters and the class reference, in reverse order. for (int parameterIndex = parameterCount-1; parameterIndex >= 0; parameterIndex--) { setMethodParameterValue(clazz, methodrefConstant, parameterIndex, stack.pop()); } // Push the return value, if applicable. String returnType = ClassUtil.internalMethodReturnType(type); if (returnType.charAt(0) != ClassConstants.TYPE_VOID) { stack.push(getMethodReturnValue(clazz, methodrefConstant, returnType)); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); // Count the number of parameters. int parameterCount = ClassUtil.internalMethodParameterCount(type); if (!isStatic) { parameterCount++; } // Pop the parameters and the class reference, in reverse order. for (int parameterIndex = parameterCount-1; parameterIndex >= 0; parameterIndex--) { setMethodParameterValue(clazz, methodrefConstant, parameterIndex, stack.pop()); } // Push the return value, if applicable. String returnType = ClassUtil.internalMethodReturnType(type); if (returnType.charAt(0) != ClassConstants.TYPE_VOID) { stack.push(getMethodReturnValue(clazz, methodrefConstant, returnType)); } }