private boolean resolvePackage(TreeLogger logger, TypeDeclaration jclass) {
SourceTypeBinding binding = jclass.binding;
String packageName = String.valueOf(binding.fPackage.readableName());
JPackage pkg = typeOracle.getOrCreatePackage(packageName);
assert (pkg != null);
CompilationUnitScope cus = (CompilationUnitScope) jclass.scope.parent;
assert (cus != null);
// Try to resolve annotations, ignore any that fail.
Map<Class<? extends java.lang.annotation.Annotation>, java.lang.annotation.Annotation> declaredAnnotations = newAnnotationMap();
resolveAnnotations(logger, cus.referenceContext.currentPackage.annotations,
declaredAnnotations);
pkg.addAnnotations(declaredAnnotations);
return true;
}