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


Java AnnotationsList.get方法代码示例

本文整理汇总了Java中com.android.dx.rop.annotation.AnnotationsList.get方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationsList.get方法的具体用法?Java AnnotationsList.get怎么用?Java AnnotationsList.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.dx.rop.annotation.AnnotationsList的用法示例。


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

示例1: ParameterAnnotationStruct

import com.android.dx.rop.annotation.AnnotationsList; //导入方法依赖的package包/类
/**
 * Constructs an instance.
 *
 * @param method {@code non-null;} the method in question
 * @param annotationsList {@code non-null;} the associated annotations list
 * @param dexFile {@code non-null;} dex output
 */
public ParameterAnnotationStruct(CstMethodRef method,
        AnnotationsList annotationsList, DexFile dexFile) {
    if (method == null) {
        throw new NullPointerException("method == null");
    }

    if (annotationsList == null) {
        throw new NullPointerException("annotationsList == null");
    }

    this.method = method;
    this.annotationsList = annotationsList;

    /*
     * Construct an item for the annotations list. TODO: This
     * requires way too much copying; fix it.
     */

    int size = annotationsList.size();
    ArrayList<AnnotationSetRefItem> arrayList = new
        ArrayList<AnnotationSetRefItem>(size);

    for (int i = 0; i < size; i++) {
        Annotations annotations = annotationsList.get(i);
        AnnotationSetItem item = new AnnotationSetItem(annotations, dexFile);
        arrayList.add(new AnnotationSetRefItem(item));
    }

    this.annotationsItem = new UniformListItem<AnnotationSetRefItem>(
            ItemType.TYPE_ANNOTATION_SET_REF_LIST, arrayList);
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:39,代码来源:ParameterAnnotationStruct.java

示例2: ParameterAnnotationStruct

import com.android.dx.rop.annotation.AnnotationsList; //导入方法依赖的package包/类
/**
 * Constructs an instance.
 *
 * @param method {@code non-null;} the method in question
 * @param annotationsList {@code non-null;} the associated annotations list
 */
public ParameterAnnotationStruct(CstMethodRef method,
        AnnotationsList annotationsList) {
    if (method == null) {
        throw new NullPointerException("method == null");
    }

    if (annotationsList == null) {
        throw new NullPointerException("annotationsList == null");
    }

    this.method = method;
    this.annotationsList = annotationsList;

    /*
     * Construct an item for the annotations list. TODO: This
     * requires way too much copying; fix it.
     */

    int size = annotationsList.size();
    ArrayList<AnnotationSetRefItem> arrayList = new
        ArrayList<AnnotationSetRefItem>(size);

    for (int i = 0; i < size; i++) {
        Annotations annotations = annotationsList.get(i);
        AnnotationSetItem item = new AnnotationSetItem(annotations);
        arrayList.add(new AnnotationSetRefItem(item));
    }

    this.annotationsItem = new UniformListItem<AnnotationSetRefItem>(
            ItemType.TYPE_ANNOTATION_SET_REF_LIST, arrayList);
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:38,代码来源:ParameterAnnotationStruct.java


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