本文整理汇总了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);
}
示例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);
}