Package org.freud.analysed.classbytecode.method.instruction

Examples of org.freud.analysed.classbytecode.method.instruction.AbstractInstructionVisitor


        for (int i = 0, size = expectedParamsDeclared.length; i < size; i++) {
            expectedParamNames[i] = typeEncoding(expectedParamsDeclared[i]);

        }
        found[0] = false;
        analysed.findInstruction(new AbstractInstructionVisitor() {
            @Override
            public void methodInvocation(final Instruction instruction, final String owner, final String methodName, final String... args) {
                if (!found[0] && expectedOwnerName.equals(owner) &&
                        expectedMethodName.equals(methodName) &&
                        Arrays.equals(expectedParamNames, args)) {
View Full Code Here


                                                  final String expectedMethodName,
                                                  final Class... expectedParamTypes) {
        final String expectedOwnerName = typeEncoding(expectedOwner);
        final boolean[] found = new boolean[1];
        found[0] = false;
        analysed.findInstruction(new AbstractInstructionVisitor() {
            @Override
            public void methodInvocation(final Instruction instruction, final String owner, final String methodName, final String... args) {
                if (!found[0] && expectedOwnerName.equals(owner) &&
                        expectedMethodName.equals(methodName)) {
                    Instruction prevInstruction = analysed.getInstruction(instruction.getInstructionIndex() - 1);
View Full Code Here


    public static boolean containsInstructions(final ClassByteCodeMethod analysed, final Opcode... opcodes) {

        final Instruction[] found = new Instruction[1];
        analysed.findInstruction(new AbstractInstructionVisitor() {
            @Override
            public void noArgInstruction(final Instruction instruction) {
                for (int i = 0; i < opcodes.length; i++) {
                    Opcode opcode = opcodes[i];
                    if (instruction.getOpcode() == opcode) {
View Full Code Here

            @Override
            protected boolean matchesSafely(final ClassByteCodeMethod item) {
                final boolean[] found = new boolean[]{false};
                found[0] = false;
                item.findInstruction(new AbstractInstructionVisitor() {
                    @Override
                    public void methodInvocation(final Instruction instruction, final String owner, final String methodName, final String... args) {
                        if (!found[0] && expectedOwnerName.equals(owner) &&
                                expectedMethodName.equals(methodName) &&
                                Arrays.equals(expectedParamNames, args)) {
View Full Code Here

            @Override
            protected boolean matchesSafely(final ClassByteCodeMethod item) {
                final boolean[] found = new boolean[1];
                found[0] = false;
                item.findInstruction(new AbstractInstructionVisitor() {
                    @Override
                    public void methodInvocation(final Instruction instruction, final String owner, final String methodName, final String... args) {
                        if (!found[0] && expectedOwnerName.equals(owner) &&
                                expectedMethodName.equals(methodName)) {
                            Instruction prevInstruction = item.getInstruction(instruction.getInstructionIndex() - 1);
View Full Code Here

        return new FreudExtendedMatcher<ClassByteCodeMethod>() {
            private Instruction found = null;

            @Override
            protected boolean matchesSafely(final ClassByteCodeMethod item) {
                item.findInstruction(new AbstractInstructionVisitor() {
                    @Override
                    public void noArgInstruction(final Instruction instruction) {
                        for (int i = 0; i < opcodes.length; i++) {
                            Opcode opcode = opcodes[i];
                            if (instruction.getOpcode() == opcode) {
View Full Code Here

TOP

Related Classes of org.freud.analysed.classbytecode.method.instruction.AbstractInstructionVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.