String methodType = methodrefConstant.getType(clazz); methodType.equals(ClassConstants.INTERNAL_METHOD_TYPE_DOT_CLASS_JIKES)) String methodName = methodrefConstant.getName(clazz); String className = methodrefConstant.getClassName(clazz);
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { if (methodrefConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { // Is the constant referring to a wrapper class? methodrefConstant.referencedClassAccept(this); } }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // Check the referenced constructor descriptor. descriptor = methodrefConstant.getType(clazz); methodrefConstant.referencedMemberAccept(this); }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // First add the referenced class constant, with its own referenced class. clazz.constantPoolEntryAccept(methodrefConstant.u2classIndex, this); // Then add the actual method reference constant, with its referenced // class and class member. constantIndex = constantPoolEditor.addMethodrefConstant(constantIndex, methodrefConstant.getName(clazz), methodrefConstant.getType(clazz), methodrefConstant.referencedClass, methodrefConstant.referencedMember); }
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { instruction.accept(clazz, method, codeAttribute, offset, invokeMatcher); if (invokeMatcher.isMatching()) { MethodrefConstant methodrefConstant = (MethodrefConstant)((ProgramClass)clazz).getConstant(invokeMatcher.matchedArgument(FIELD_INDEX)); if (ClassConstants.METHOD_NAME_INIT.equals(methodrefConstant.getName(clazz))) { isSuperConstructorCalled |= methodrefConstant.getClassName(clazz).equals(clazz.getSuperName()); } } }
return addConstant(new MethodrefConstant(classIndex, nameAndTypeIndex, referencedClass,
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // Remember whether the method is an initializer. isInitializer = methodrefConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT); }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { methodrefConstant.referencedMemberAccept(this); }
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { instruction.accept(clazz, method, codeAttribute, offset, invokeMatcher); if (invokeMatcher.isMatching()) { MethodrefConstant methodrefConstant = (MethodrefConstant)((ProgramClass)clazz).getConstant(invokeMatcher.matchedArgument(FIELD_INDEX)); if (ClassConstants.METHOD_NAME_INIT.equals(methodrefConstant.getName(clazz))) { isSuperConstructorCalled |= methodrefConstant.getClassName(clazz).equals(clazz.getSuperName()); } } }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // First add the referenced class constant, with its own referenced class. clazz.constantPoolEntryAccept(methodrefConstant.u2classIndex, this); // Then add the actual method reference constant, with its referenced // class and class member. constantIndex = constantPoolEditor.addMethodrefConstant(constantIndex, methodrefConstant.getName(clazz), methodrefConstant.getType(clazz), methodrefConstant.referencedClass, methodrefConstant.referencedMember); }
return addConstant(new MethodrefConstant(classIndex, nameAndTypeIndex, referencedClass,
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // Remember whether the method is an initializer. isInitializer = methodrefConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT); }
String methodType = methodrefConstant.getType(clazz); methodType.equals(ClassConstants.METHOD_TYPE_DOT_CLASS_JIKES)) String methodName = methodrefConstant.getName(clazz); String className = methodrefConstant.getClassName(clazz);
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { instruction.accept(clazz, method, codeAttribute, offset, invokeMatcher); if (invokeMatcher.isMatching()) { MethodrefConstant methodrefConstant = (MethodrefConstant)((ProgramClass)clazz).getConstant(invokeMatcher.matchedArgument(FIELD_INDEX)); if (ClassConstants.METHOD_NAME_INIT.equals(methodrefConstant.getName(clazz))) { isSuperConstructorCalled |= methodrefConstant.getClassName(clazz).equals(clazz.getSuperName()); } } }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // First add the referenced class constant, with its own referenced class. clazz.constantPoolEntryAccept(methodrefConstant.u2classIndex, this); // Then add the actual method reference constant, with its referenced // class and class member. constantIndex = constantPoolEditor.addMethodrefConstant(constantIndex, methodrefConstant.getName(clazz), methodrefConstant.getType(clazz), methodrefConstant.referencedClass, methodrefConstant.referencedMember); }
return addConstant(new MethodrefConstant(classIndex, nameAndTypeIndex, referencedClass,
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { // Remember whether the method is an initializer. isInitializer = methodrefConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT); }
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { if (methodrefConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { // Is the constant referring to a wrapper class? methodrefConstant.referencedClassAccept(this); } }
String methodType = methodrefConstant.getType(clazz); methodType.equals(ClassConstants.METHOD_TYPE_DOT_CLASS_JIKES)) String methodName = methodrefConstant.getName(clazz); String className = methodrefConstant.getClassName(clazz);
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) { String className = methodrefConstant.getClassName(clazz); if (className.equals(ClassConstants.NAME_JAVA_LANG_CLASS) || className.equals(ClassConstants.NAME_JAVA_LANG_REFLECT_FIELD) || className.equals(ClassConstants.NAME_JAVA_LANG_REFLECT_METHOD)) { String methodName = methodrefConstant.getName(clazz); if (methodName.startsWith(ClassConstants.METHOD_NAME_GET_TYPE_PREFIX) || methodName.startsWith(ClassConstants.METHOD_NAME_GET_GENERIC_PREFIX)) { notePrinter.print(clazz.getName(), "Note: " + ClassUtil.externalClassName(clazz.getName()) + " calls '" + ClassUtil.externalShortClassName(ClassUtil.externalClassName(className)) + "." + methodName + "'"); } } } }