private boolean isRelevantAnnotation(@NonNull Annotation annotation) { String fqn = getFqn(annotation); if (fqn == null || fqn.startsWith("java.lang.")) { return false; } if (fqn.startsWith(SUPPORT_ANNOTATIONS_PREFIX)) { if (fqn.equals(SUPPORT_KEEP)) { return true; // even with class file retention we want to process these } //noinspection PointlessBooleanExpression,ConstantConditions,RedundantIfStatement if (!includeClassRetentionAnnotations && !hasSourceRetention(fqn, annotation)) { return false; } return true; } else if (fqn.startsWith(ANDROID_ANNOTATIONS_PREFIX)) { return isRelevantFrameworkAnnotation(fqn); } if (fqn.equals(ANDROID_NULLABLE) || fqn.equals(ANDROID_NOTNULL) || isMagicConstant(fqn)) { return true; } else if (fqn.equals(IDEA_CONTRACT)) { return true; } return false; }
private boolean isRelevantAnnotation(@NonNull Annotation annotation) { String fqn = getFqn(annotation); if (fqn == null || fqn.startsWith("java.lang.")) { return false; } if (fqn.startsWith(SUPPORT_ANNOTATIONS_PREFIX)) { if (fqn.equals(SUPPORT_KEEP)) { return true; // even with class file retention we want to process these } //noinspection PointlessBooleanExpression,ConstantConditions,RedundantIfStatement if (!includeClassRetentionAnnotations && !hasSourceRetention(fqn, annotation)) { return false; } return true; } else if (fqn.startsWith(ANDROID_ANNOTATIONS_PREFIX)) { return isRelevantFrameworkAnnotation(fqn); } if (fqn.equals(ANDROID_NULLABLE) || fqn.equals(ANDROID_NOTNULL) || isMagicConstant(fqn)) { return true; } else if (fqn.equals(IDEA_CONTRACT)) { return true; } return false; }
} else if (annotation.type.resolvedType.getAnnotations() != null) { for (AnnotationBinding binding : annotation.type.resolvedType.getAnnotations()) { if (hasSourceRetention(binding)) { sourceRetention.put(fqn, true); return true;
} else if (annotation.type.resolvedType.getAnnotations() != null) { for (AnnotationBinding binding : annotation.type.resolvedType.getAnnotations()) { if (hasSourceRetention(binding)) { sourceRetention.put(fqn, true); return true;
&& !Extractor.hasSourceRetention(annotations)) { Extractor.warning(getFileName() + ": The typedef annotation " + fqn
fqn.substring(ANDROID_ANNOTATIONS_PREFIX.length()); if (!includeClassRetentionAnnotations && !hasSourceRetention(resAnnotation, null)) { return; fqn.substring(ANDROID_ANNOTATIONS_PREFIX.length()); if (!includeClassRetentionAnnotations && !hasSourceRetention(supportAnnotation, null)) { return;
&& !Extractor.hasSourceRetention(annotations)) { Extractor.warning(getFileName() + ": The typedef annotation " + fqn
fqn.substring(ANDROID_ANNOTATIONS_PREFIX.length()); if (!includeClassRetentionAnnotations && !hasSourceRetention(resAnnotation, null)) { return null; fqn.substring(ANDROID_ANNOTATIONS_PREFIX.length()); if (!includeClassRetentionAnnotations && !hasSourceRetention(supportAnnotation, null)) { return null;