if (il.getLength() > 60) { return false;
/** * Factory method for creating a source line annotation describing an entire * method. * * @param methodGen * the method being visited * @return the SourceLineAnnotation, or null if we do not have line number * information for the method */ public static SourceLineAnnotation fromVisitedMethod(MethodGen methodGen, String sourceFile) { LineNumberTable lineNumberTable = methodGen.getLineNumberTable(methodGen.getConstantPool()); String className = methodGen.getClassName(); int codeSize = methodGen.getInstructionList().getLength(); if (lineNumberTable == null) { return createUnknown(className, sourceFile, 0, codeSize - 1); } return forEntireMethod(className, sourceFile, lineNumberTable, codeSize); }
/** * Reread the instruction list, e.g., after you've altered the list upon a match. */ public final void reread() { int size = il.getLength(); char[] buf = new char[size]; // Create a string with length equal to il length handles = il.getInstructionHandles(); // Map opcodes to characters for(int i=0; i < size; i++) buf[i] = makeChar(handles[i].getInstruction().getOpcode()); il_string = new String(buf); }
/** * Reread the instruction list, e.g., after you've altered the list upon a * match. */ public final void reread() { final int size = il.getLength(); final char[] buf = new char[size]; // Create a string with length equal to il length handles = il.getInstructionHandles(); // Map opcodes to characters for (int i = 0; i < size; i++) { buf[i] = makeChar(handles[i].getInstruction().getOpcode()); } il_string = new String(buf); }
if (il.getLength() > 60) { return false;
/** * Factory method for creating a source line annotation describing an entire * method. * * @param methodGen * the method being visited * @return the SourceLineAnnotation, or null if we do not have line number * information for the method */ public static SourceLineAnnotation fromVisitedMethod(MethodGen methodGen, String sourceFile) { LineNumberTable lineNumberTable = methodGen.getLineNumberTable(methodGen.getConstantPool()); String className = methodGen.getClassName(); int codeSize = methodGen.getInstructionList().getLength(); if (lineNumberTable == null) { return createUnknown(className, sourceFile, 0, codeSize - 1); } return forEntireMethod(className, sourceFile, lineNumberTable, codeSize); }