LOG.warning(typeHandle.toString() + " cannot be resolved using: " // NOI18N + model.getCompilationController()
/** * Resolves an {@link Element} from the {@link ElementHandle}. * @param compilationInfo representing the {@link javax.tools.CompilationTask} * in which the {@link Element} should be resolved. * @return resolved subclass of {@link Element} or null if the elment does not exist on * the classpath/sourcepath of {@link javax.tools.CompilationTask}. */ @SuppressWarnings ("unchecked") // NOI18N public @CheckForNull T resolve (@NonNull final CompilationInfo compilationInfo) { Parameters.notNull("compilationInfo", compilationInfo); // NOI18N T result = resolveImpl (compilationInfo.impl.getJavacTask()); if (result == null) { if (log.isLoggable(Level.INFO)) log.log(Level.INFO, "Cannot resolve: {0}", toString()); //NOI18N } else { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Resolved element = {0}", result); } return result; }
LOG.warning(handle.toString() + " cannot be resolved using: " // NOI18N + model.getCompilationController()
/** * Returns an estimate of a number of classes on given source path (source root) which are * using given package. * @param pkg the package to find the usage frequency for. * @return number of classes using types from given package. */ public int getPackageReferenceCount(@NonNull final ElementHandle<? extends PackageElement> pkg) { Parameters.notNull("pkgName", pkg); //NOI18N if (pkg.getKind() != ElementKind.PACKAGE) { throw new IllegalArgumentException(pkg.toString()); } try { init(); final Integer count = pkgFreqs.get(SourceUtils.getJVMSignature(pkg)[0]); return count == null ? 0 : count; } catch (InterruptedException ie) { return 0; } }
Logger.getLogger("global").log(Level.FINE, String.format("Cannot resolve: %s on bootpath: %s classpath: %s sourcepath: %s\n", eh.toString(), controller.getClasspathInfo().getClassPath(ClasspathInfo.PathKind.BOOT), controller.getClasspathInfo().getClassPath(ClasspathInfo.PathKind.COMPILE),
/** * Returns an estimate of a number of classes on given source path (source root) which are * using given type. * @param type the type type to find the usage frequency for. * @return number of classes using the type. */ public int getTypeReferenceCount(@NonNull final ElementHandle<? extends TypeElement> type) { Parameters.notNull("binaryName", type); //NOI18N if (!type.getKind().isClass() && !type.getKind().isInterface() && type.getKind() != ElementKind.OTHER) { throw new IllegalArgumentException(type.toString()); } try { init(); final Integer count = typeFreqs.get(SourceUtils.getJVMSignature(type)[0]); return count == null ? 0 : count; } catch (InterruptedException ie) { return 0; } }
throw new IllegalArgumentException(element.toString());