List of usage examples for org.eclipse.jdt.internal.compiler.lookup PackageBinding getAnnotations
public AnnotationBinding[] getAnnotations()
From source file:com.android.tools.lint.psi.EcjPsiPackage.java
License:Apache License
@SuppressWarnings("SameParameterValue") private PsiAnnotation[] findAnnotations(boolean includeSuper) { List<PsiAnnotation> all = Lists.newArrayListWithExpectedSize(4); ExternalAnnotationRepository manager = mManager.getAnnotationRepository(); PackageBinding binding = this.mPackageBinding; AnnotationBinding[] annotations = binding.getAnnotations(); int count = annotations.length; if (count > 0) { for (AnnotationBinding annotation : annotations) { if (annotation != null) { all.add(new EcjPsiBinaryAnnotation(mManager, this, annotation)); }/*from w w w . j av a2 s. com*/ } } // Look for external annotations if (manager != null) { Collection<PsiAnnotation> external = manager.getAnnotations(binding); if (external != null) { all.addAll(external); } } return EcjPsiManager.ensureUnique(all); }