@Test public void mustFindStaticMethods() throws IOException { classNode = readZipResourcesAsClassNodes("StaticInvokeTest.zip").get("StaticInvokeTest.class"); List<MethodNode> methodNodes = findStaticMethods(classNode.methods); assertEquals(1, methodNodes.size()); assertEquals("echo", methodNodes.get(0).name); }
public static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes) { Validate.notNull(methodNodes); Validate.noNullElements(methodNodes); List<MethodNode> ret = new ArrayList<>(); for (MethodNode methodNode : methodNodes) { if ((methodNode.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) { ret.add(methodNode); } } return ret; }
SearchUtils { public static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes) { Validate.notNull(methodNodes); Validate.noNullElements(methodNodes); List<MethodNode> ret = new ArrayList<>(); for (MethodNode methodNode : methodNodes) { if ((methodNode.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) { ret.add(methodNode); } } return ret; } }
SearchUtils { public static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes) { Validate.notNull(methodNodes); Validate.noNullElements(methodNodes); List<MethodNode> ret = new ArrayList<>(); for (MethodNode methodNode : methodNodes) { if ((methodNode.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) { ret.add(methodNode); } } return ret; } private  SearchUtils(); }
SearchUtils { public static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes) { Validate.notNull(methodNodes); Validate.noNullElements(methodNodes); List<MethodNode> ret = new ArrayList<>(); for (MethodNode methodNode : methodNodes) { if ((methodNode.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) { ret.add(methodNode); } } return ret; } private  SearchUtils(); static List<MethodNode> findMethodsWithName(Collection<MethodNode> methodNodes, String name); static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes); static List<MethodNode> findMethodsWithParameter(Collection<MethodNode> methodNodes, Type expectedParamType); static List<MethodNode> findMethodsWithParameters(Collection<MethodNode> methodNodes, Type ... paramTypes); static MethodNode findMethod(Collection<MethodNode> methodNodes, boolean isStatic, Type returnType, String name,
            Type ... paramTypes); static List<AbstractInsnNode> findInvocationsOf(InsnList insnList, Method expectedMethod); static List<AbstractInsnNode> findInvocationsWithParameter(InsnList insnList,
            Type expectedParamType); static List<AbstractInsnNode> searchForOpcodes(InsnList insnList, int ... opcodes); static List<TryCatchBlockNode> findTryCatchBlockNodesEncompassingInstruction(InsnList insnList,
            List<TryCatchBlockNode> tryCatchBlockNodes, AbstractInsnNode insnNode); static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode); static LocalVariableNode findLocalVariableNodeForInstruction(List<LocalVariableNode> lvnList, InsnList insnList,
            final AbstractInsnNode insnNode, int idx); static FieldNode findField(ClassNode classNode, String name); }
SearchUtils { public static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes) { Validate.notNull(methodNodes); Validate.noNullElements(methodNodes); List<MethodNode> ret = new ArrayList<>(); for (MethodNode methodNode : methodNodes) { if ((methodNode.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) { ret.add(methodNode); } } return ret; } private  SearchUtils(); static List<MethodNode> findMethodsWithName(Collection<MethodNode> methodNodes, String name); static List<MethodNode> findStaticMethods(Collection<MethodNode> methodNodes); static List<MethodNode> findMethodsWithParameter(Collection<MethodNode> methodNodes, Type expectedParamType); static List<MethodNode> findMethodsWithParameters(Collection<MethodNode> methodNodes, Type ... paramTypes); static MethodNode findMethod(Collection<MethodNode> methodNodes, boolean isStatic, Type returnType, String name,
            Type ... paramTypes); static List<AbstractInsnNode> findInvocationsOf(InsnList insnList, Method expectedMethod); static List<AbstractInsnNode> findInvocationsWithParameter(InsnList insnList,
            Type expectedParamType); static List<AbstractInsnNode> searchForOpcodes(InsnList insnList, int ... opcodes); static List<TryCatchBlockNode> findTryCatchBlockNodesEncompassingInstruction(InsnList insnList,
            List<TryCatchBlockNode> tryCatchBlockNodes, AbstractInsnNode insnNode); static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode); static LocalVariableNode findLocalVariableNodeForInstruction(List<LocalVariableNode> lvnList, InsnList insnList,
            final AbstractInsnNode insnNode, int idx); static FieldNode findField(ClassNode classNode, String name);  }