/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_UTF, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
/** * Helper for {@code addContents()} methods, which adds * contents for a particular constant, calling itself recursively * should it encounter a {@link CstArray} and calling {@link * #addContents(DexFile,Annotation)} recursively should it * encounter a {@link CstAnnotation}. * * @param file {@code non-null;} the file to add to * @param cst {@code non-null;} the constant to add contents for */ public static void addContents(DexFile file, Constant cst) { if (cst instanceof CstAnnotation) { addContents(file, ((CstAnnotation) cst).getAnnotation()); } else if (cst instanceof CstArray) { CstArray.List list = ((CstArray) cst).getList(); int size = list.size(); for (int i = 0; i < size; i++) { addContents(file, list.get(i)); } } else { file.internIfAppropriate(cst); } } }
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
delegateMethodElement.addContent(paramElement); Annotation paramsAnnotation= ((CstAnnotation) paramList.get(i)).getAnnotation(); for (NameValuePair paramsPair : paramsAnnotation.getNameValuePairs())
/** * Constructs a standard {@code AnnotationDefault} annotation. * * @param defaults {@code non-null;} the defaults, itself as an annotation * @return {@code non-null;} the constructed annotation */ public static Annotation makeAnnotationDefault(Annotation defaults) { Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM); result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults))); result.setImmutable(); return result; }
writeAnnotation(((CstAnnotation) cst).getAnnotation(), false); break;
Annotation annotation = parseAnnotation(AnnotationVisibility.EMBEDDED); return new CstAnnotation(annotation);
writeAnnotation(((CstAnnotation) cst).getAnnotation(), false); break;