private int addAnnotations(Element itemElement, Item item) { int count = 0; for (Element annotationElement : getChildren(itemElement)) { if (!isRelevantAnnotation(annotationElement)) { continue; } AnnotationData annotation = createAnnotation(annotationElement); item.annotations.add(annotation); count++; } return count; }
private int addAnnotations(Element itemElement, Item item) { int count = 0; for (Element annotationElement : getChildren(itemElement)) { if (!isRelevantAnnotation(annotationElement)) { continue; } AnnotationData annotation = createAnnotation(annotationElement); item.annotations.add(annotation); count++; } return count; }
fqn.equals(ANDROID_INT_DEF) || fqn.equals(ANDROID_STRING_DEF))) { AnnotationData a = createAnnotation(typeDef); if (a != null) { types.put(typeName, a);
private void addAnnotations(@Nullable Annotation[] annotations, @NonNull Item item) { if (annotations != null) { for (Annotation annotation : annotations) { if (isRelevantAnnotation(annotation)) { AnnotationData annotationData = createAnnotation(annotation); if (annotationData != null) { if (annotationData.name.equals(SUPPORT_KEEP)) { // Put keep rules in a different place; we don't want to write // these out into the external annotations database, they go // into a special proguard file keepItems.add(item); } else { item.annotations.add(annotationData); } } } } } }
private boolean isRelevantAnnotation(Element annotationElement) { AnnotationData annotation = createAnnotation(annotationElement); if (annotation == null) { // Unsupported annotation in import return false; } if (isNullable(annotation.name) || isNonNull(annotation.name) || annotation.name.startsWith(ANDROID_ANNOTATIONS_PREFIX) || annotation.name.startsWith(SUPPORT_ANNOTATIONS_PREFIX)) { return true; } else if (annotation.name.equals(IDEA_CONTRACT)) { return true; } else if (annotation.name.equals(IDEA_NON_NLS)) { return false; } else { if (!ignoredAnnotations.contains(annotation.name)) { ignoredAnnotations.add(annotation.name); if (isListIgnored()) { info("(Ignoring merge annotation " + annotation.name + ")"); } } } return false; }
private boolean isRelevantAnnotation(Element annotationElement) { AnnotationData annotation = createAnnotation(annotationElement); if (annotation == null) { // Unsupported annotation in import return false; } if (isNullable(annotation.name) || isNonNull(annotation.name) || annotation.name.startsWith(ANDROID_ANNOTATIONS_PREFIX) || annotation.name.startsWith(SUPPORT_ANNOTATIONS_PREFIX)) { return true; } else if (annotation.name.equals(IDEA_CONTRACT)) { return true; } else if (annotation.name.equals(IDEA_NON_NLS)) { return false; } else { if (!ignoredAnnotations.contains(annotation.name)) { ignoredAnnotations.add(annotation.name); if (isListIgnored()) { info("(Ignoring merge annotation " + annotation.name + ")"); } } } return false; }
continue; AnnotationData annotation = createAnnotation(annotationElement); if (annotation == null) { continue;
continue; AnnotationData annotation = createAnnotation(annotationElement); if (annotation == null) { continue;