/** * Adds a parameter annotations item to this instance. * * @param method {@code non-null;} method in question * @param list {@code non-null;} associated list of annotation sets to add */ public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) { if (parameterAnnotations == null) { parameterAnnotations = new ArrayList<ParameterAnnotationStruct>(); } parameterAnnotations.add(new ParameterAnnotationStruct(method, list)); }
/** * Gets the parameter annotations for a given method, if any. This is * meant for use by debugging / dumping code. * * @param method {@code non-null;} the method * @return {@code null-ok;} the parameter annotations, if any */ public AnnotationsList getParameterAnnotations(CstMethodRef method) { if (parameterAnnotations == null) { return null; } for (ParameterAnnotationStruct item : parameterAnnotations) { if (item.getMethod().equals(method)) { return item.getAnnotationsList(); } } return null; }
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection wordData = file.getWordData(); if (classAnnotations != null) { classAnnotations = wordData.intern(classAnnotations); } if (fieldAnnotations != null) { for (FieldAnnotationStruct item : fieldAnnotations) { item.addContents(file); } } if (methodAnnotations != null) { for (MethodAnnotationStruct item : methodAnnotations) { item.addContents(file); } } if (parameterAnnotations != null) { for (ParameterAnnotationStruct item : parameterAnnotations) { item.addContents(file); } } }
out.println(" parameter annotations:"); for (ParameterAnnotationStruct item : parameterAnnotations) { out.println(" " + item.toHuman());
item.writeTo(file, out);
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection wordData = file.getWordData(); if (classAnnotations != null) { classAnnotations = wordData.intern(classAnnotations); } if (fieldAnnotations != null) { for (FieldAnnotationStruct item : fieldAnnotations) { item.addContents(file); } } if (methodAnnotations != null) { for (MethodAnnotationStruct item : methodAnnotations) { item.addContents(file); } } if (parameterAnnotations != null) { for (ParameterAnnotationStruct item : parameterAnnotations) { item.addContents(file); } } }
out.println(" parameter annotations:"); for (ParameterAnnotationStruct item : parameterAnnotations) { out.println(" " + item.toHuman());
item.writeTo(file, out);
/** * Gets the parameter annotations for a given method, if any. This is * meant for use by debugging / dumping code. * * @param method {@code non-null;} the method * @return {@code null-ok;} the parameter annotations, if any */ public AnnotationsList getParameterAnnotations(CstMethodRef method) { if (parameterAnnotations == null) { return null; } for (ParameterAnnotationStruct item : parameterAnnotations) { if (item.getMethod().equals(method)) { return item.getAnnotationsList(); } } return null; }
/** * Adds a parameter annotations item to this instance. * * @param method {@code non-null;} method in question * @param list {@code non-null;} associated list of annotation sets to add */ public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) { if (parameterAnnotations == null) { parameterAnnotations = new ArrayList<ParameterAnnotationStruct>(); } parameterAnnotations.add(new ParameterAnnotationStruct(method, list)); }
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection wordData = file.getWordData(); if (classAnnotations != null) { classAnnotations = wordData.intern(classAnnotations); } if (fieldAnnotations != null) { for (FieldAnnotationStruct item : fieldAnnotations) { item.addContents(file); } } if (methodAnnotations != null) { for (MethodAnnotationStruct item : methodAnnotations) { item.addContents(file); } } if (parameterAnnotations != null) { for (ParameterAnnotationStruct item : parameterAnnotations) { item.addContents(file); } } }
out.println(" parameter annotations:"); for (ParameterAnnotationStruct item : parameterAnnotations) { out.println(" " + item.toHuman());
item.writeTo(file, out);
/** * Gets the parameter annotations for a given method, if any. This is * meant for use by debugging / dumping code. * * @param method {@code non-null;} the method * @return {@code null-ok;} the parameter annotations, if any */ public AnnotationsList getParameterAnnotations(CstMethodRef method) { if (parameterAnnotations == null) { return null; } for (ParameterAnnotationStruct item : parameterAnnotations) { if (item.getMethod().equals(method)) { return item.getAnnotationsList(); } } return null; }
/** * Adds a parameter annotations item to this instance. * * @param method {@code non-null;} method in question * @param list {@code non-null;} associated list of annotation sets to add */ public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) { if (parameterAnnotations == null) { parameterAnnotations = new ArrayList<ParameterAnnotationStruct>(); } parameterAnnotations.add(new ParameterAnnotationStruct(method, list)); }
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection wordData = file.getWordData(); if (classAnnotations != null) { classAnnotations = wordData.intern(classAnnotations); } if (fieldAnnotations != null) { for (FieldAnnotationStruct item : fieldAnnotations) { item.addContents(file); } } if (methodAnnotations != null) { for (MethodAnnotationStruct item : methodAnnotations) { item.addContents(file); } } if (parameterAnnotations != null) { for (ParameterAnnotationStruct item : parameterAnnotations) { item.addContents(file); } } }
out.println(" parameter annotations:"); for (ParameterAnnotationStruct item : parameterAnnotations) { out.println(" " + item.toHuman());
item.writeTo(file, out);
/** * Gets the parameter annotations for a given method, if any. This is * meant for use by debugging / dumping code. * * @param method {@code non-null;} the method * @return {@code null-ok;} the parameter annotations, if any */ public AnnotationsList getParameterAnnotations(CstMethodRef method) { if (parameterAnnotations == null) { return null; } for (ParameterAnnotationStruct item : parameterAnnotations) { if (item.getMethod().equals(method)) { return item.getAnnotationsList(); } } return null; }
/** * Adds a parameter annotations item to this instance. * * @param method {@code non-null;} method in question * @param list {@code non-null;} associated list of annotation sets to add */ public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) { if (parameterAnnotations == null) { parameterAnnotations = new ArrayList<ParameterAnnotationStruct>(); } parameterAnnotations.add(new ParameterAnnotationStruct(method, list)); }