当前位置: 首页>>代码示例>>Java>>正文


Java ImmutableMethodParameter类代码示例

本文整理汇总了Java中org.jf.dexlib2.immutable.ImmutableMethodParameter的典型用法代码示例。如果您正苦于以下问题:Java ImmutableMethodParameter类的具体用法?Java ImmutableMethodParameter怎么用?Java ImmutableMethodParameter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ImmutableMethodParameter类属于org.jf.dexlib2.immutable包,在下文中一共展示了ImmutableMethodParameter类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reParameters

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
@Override
protected Iterable<? extends MethodParameter> reParameters(final List<? extends MethodParameter> paramters) {
    final List<ImmutableMethodParameter> list = new ArrayList<ImmutableMethodParameter>();
    for (MethodParameter methodParameter : paramters) {
        boolean isBasic = false;
        if (basicType.containsKey(methodParameter.getType())) {
            isBasic = true;
        }
        list.add(new ImmutableMethodParameter(
                isBasic ? methodParameter.getType() : DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(methodParameter.getType())).className,methodParameter.getType().startsWith("[")),
                methodParameter.getAnnotations(), methodParameter.getName()));
    }
    return new Iterable<ImmutableMethodParameter>() {
        @Override
        public Iterator<ImmutableMethodParameter> iterator() {
            return list.iterator();

        }
    };
}
 
开发者ID:alibaba,项目名称:atlas,代码行数:21,代码来源:MethodImplReIClassDef.java

示例2: parseParamString

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
@Nonnull
public static Iterable<ImmutableMethodParameter> parseParamString(@Nonnull final String params) {
    return new Iterable<ImmutableMethodParameter>() {
        @Override public Iterator<ImmutableMethodParameter> iterator() {
            return new Iterator<ImmutableMethodParameter>() {

                private int index = 0;

                @Override public boolean hasNext() {
                    return index < params.length();
                }

                @Override public ImmutableMethodParameter next() {
                    int end = findTypeEnd(params, index);
                    String ret = params.substring(index, end);
                    index = end;
                    return new ImmutableMethodParameter(ret, null, null);
                }

                @Override public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
        }
    };
}
 
开发者ID:CvvT,项目名称:andbg,代码行数:27,代码来源:ParamUtil.java

示例3: parseParamString

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
public static Iterable<ImmutableMethodParameter> parseParamString( final String params) {
    return new Iterable<ImmutableMethodParameter>() {
        @Override public Iterator<ImmutableMethodParameter> iterator() {
            return new Iterator<ImmutableMethodParameter>() {

                private int index = 0;

                @Override public boolean hasNext() {
                    return index < params.length();
                }

                @Override public ImmutableMethodParameter next() {
                    int end = findTypeEnd(params, index);
                    String ret = params.substring(index, end);
                    index = end;
                    return new ImmutableMethodParameter(ret, null, null);
                }

                @Override public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
        }
    };
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:26,代码来源:ParamUtil.java

示例4: parseParamString

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
@Nonnull
public static Iterable<ImmutableMethodParameter> parseParamString(@Nonnull final String params) {
    return new Iterable<ImmutableMethodParameter>() {
        @Override
        public Iterator<ImmutableMethodParameter> iterator() {
            return new Iterator<ImmutableMethodParameter>() {

                private int index = 0;

                @Override
                public boolean hasNext() {
                    return index < params.length();
                }

                @Override
                public ImmutableMethodParameter next() {
                    int end = findTypeEnd(params, index);
                    String ret = params.substring(index, end);
                    index = end;
                    return new ImmutableMethodParameter(ret, null, null);
                }

                @Override
                public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
        }
    };
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:31,代码来源:ParamUtil.java

示例5: inlineMethod

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
@Nonnull
private static Method inlineMethod(int accessFlags, @Nonnull String cls, @Nonnull String name,
                                   @Nonnull String params, @Nonnull String returnType) {
    ImmutableList<ImmutableMethodParameter> paramList = ImmutableList.copyOf(ParamUtil.parseParamString(params));
    return new ImmutableMethod(cls, name, paramList, returnType, accessFlags, null, null);
}
 
开发者ID:CvvT,项目名称:andbg,代码行数:7,代码来源:InlineMethodResolver.java

示例6: toMethods

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
private Collection<BuilderMethod> toMethods(SootClass clazz) {
	if (clazz.getMethods().isEmpty())
		return null;
	
       String classType = SootToDexUtils.getDexTypeDescriptor(clazz.getType());
       List<BuilderMethod> methods = new ArrayList<BuilderMethod>();
       for (SootMethod sm : clazz.getMethods()) {
           if (sm.isPhantom()) {
               // Do not print method bodies for inherited methods
               continue;
           }
           
       	MethodImplementation impl = toMethodImplementation(sm);
       	
       	List<String> parameterNames = null;
       	if (sm.hasTag("ParamNamesTag"))
       		parameterNames = ((ParamNamesTag) sm.getTag("ParamNamesTag")).getNames();
       	
       	int paramIdx = 0;
       	List<MethodParameter> parameters = null;
       	if (sm.getParameterCount() > 0) {
       		parameters = new ArrayList<MethodParameter>();
        	for (Type tp : sm.getParameterTypes()) {
        		String paramType = SootToDexUtils.getDexTypeDescriptor(tp);
        		parameters.add(new ImmutableMethodParameter(paramType,
        				buildMethodParameterAnnotations(sm, paramIdx),
        				sm.isConcrete() && parameterNames != null ?
        						parameterNames.get(paramIdx) : null));
        		paramIdx++;
        	}
       	}
       	
           String returnType = SootToDexUtils.getDexTypeDescriptor(sm.getReturnType());
           
		int accessFlags = SootToDexUtils.getDexAccessFlags(sm);
           BuilderMethod meth = dexFile.internMethod(classType,
				sm.getName(),
				parameters,
				returnType,
				accessFlags,
				buildMethodAnnotations(sm),
				impl);
           methods.add(meth);
       }
	return methods;
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:47,代码来源:DexPrinter.java

示例7: inlineMethod

import org.jf.dexlib2.immutable.ImmutableMethodParameter; //导入依赖的package包/类
private static Method inlineMethod(int accessFlags,  String cls,  String name,
                                    String params,  String returnType) {
    ImmutableList<ImmutableMethodParameter> paramList = ImmutableList.copyOf(ParamUtil.parseParamString(params));
    return new ImmutableMethod(cls, name, paramList, returnType, accessFlags, null, null);
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:6,代码来源:InlineMethodResolver.java


注:本文中的org.jf.dexlib2.immutable.ImmutableMethodParameter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。