* @param clazz
* @return
* @throws IOException
*/
public static List<MethodEntity> getAllMethod(Class<?> clazz, final String findName) throws IOException{
final AClass owner = AClassFactory.getProductClass(clazz);
InputStream classStream = ASMClassLoader.asmClassLoader.getResourceAsStream(clazz.getName().replace('.', '/') + ".class");
ClassReader cr = new ClassReader(classStream);
final List<MethodEntity> list = new ArrayList<MethodEntity>();
cr.accept(new ClassAdapter(new EmptyVisitor()){
@Override
public MethodVisitor visitMethod(int access, String name,
String desc, String signature, String[] exceptions) {
if((StringUtils.isEmpty(findName) || name.equals(findName))){
if(exceptions == null){
exceptions = new String[0];
}
try {
Type[] types = Type.getArgumentTypes(desc);
AClass[] aclass = new AClass[types.length];
String[] args = new String[types.length];
for(int i=0; i<types.length; i++){
aclass[i] = AClassFactory.getProductClass(forName(types[i].getDescriptor()));
args[i] = "arg" + i;
}
AClass returnType = AClassFactory.getProductClass(
forName(Type.getReturnType(desc).getDescriptor()));
AClass[] exceptionArray = new AClass[exceptions.length];
for(int i=0; i<exceptions.length; i++){