Java Aspectj Usage collectArguments(JoinPoint jp)

Here you can find the source of collectArguments(JoinPoint jp)

Description

collect Arguments

License

Apache License

Declaration

public static Iterable<Object> collectArguments(JoinPoint jp) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import org.aspectj.lang.JoinPoint;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class Main {
    public static Iterable<Object> collectArguments(JoinPoint jp) {
        List<Object> result = new ArrayList<>();

        for (Object arg : jp.getArgs()) {
            if (arg instanceof Collection) {
                result.addAll((Collection) arg);
            } else {
                result.add(arg);/* w w w  .  j  a va  2  s .  c o  m*/
            }
        }
        return result;
    }
}

Related

  1. accessToString(int access_flags, boolean for_class)
  2. arrayAsList(Object[] ra)
  3. classOrInterface(int access_flags)
  4. combine(String[] one, String[] two)
  5. convertToFile(String path)
  6. copyInstruction(Instruction i)
  7. createConstant(InstructionFactory fact, int value)