org.netbeans.api.annotations.common.NonNull.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.netbeans.api.annotations.common.NonNull.<init>()方法的一些代码示例,展示了NonNull.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull.<init>()方法的具体详情如下:
包路径:org.netbeans.api.annotations.common.NonNull
类名称:NonNull
方法名:<init>

NonNull.<init>介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

CachedZipFileObject(
      @NonNull final ZipFile zipFile,
      @NullAllowed final String pathToRootInArchive,
      @NonNull final String folderName,
      @NonNull final String baseName,
      final long mtime) {
    super (pathToRootInArchive, folderName, baseName, mtime);
    assert zipFile != null : "archiveFile == null";   //NOI18N
  this.zipFile = zipFile;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui

private LibraryReference(
    @NonNull final String classPathId,
    @NonNull final String rawId,
    @NullAllowed final Profile requiredProfile,
    @NonNull final Library lib) {
  super(classPathId, rawId, requiredProfile);
  Parameters.notNull("lib", lib); //NOI18N
  this.lib = lib;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-extexecution-base

/**
 * Creates the new input representing the given file.
 *
 * @param file file to represent
 * @param charset associated charset
 */
public FileInput(@NonNull File file, @NonNull Charset charset) {
  Parameters.notNull("file", file);
  Parameters.notNull("charset", charset);
  this.file = file;
  this.charset = charset;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

public void fileModified(@NonNull final URI file) {
  Parameters.notNull("file", file);   //NOI18N
  synchronized (lock) {
    LOG.log(
      Level.FINE,
      "fileModified: {0}",    //NOI18N
      file);
    final Set<URI> addInto = addedFiles != null ? addedFiles : files;
    addInto.add(file);
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

@Override
protected short getFlags(@NonNull final String dirname) throws IOException {
  boolean isPublic = pkgs.containsKey(dirname);
  LOG.log(
    Level.FINE,
    "Package: {0} is public: {1}", //NOI18N
    new Object[]{
      dirname,
      isPublic
    });
  return (short) (isPublic ? 0 : 1);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-api-testing

/**
 * Create project customizer for the given PHP module.
 * @param phpModule the PHP module; never {@code null}
 * @return project customizer, can be {@code null} if not supported
 * @since 0.8
 */
@CheckForNull
ProjectCustomizer.CompositeCategoryProvider createCustomizer(@NonNull PhpModule phpModule);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-editor

@CheckForNull
public static Command forName(@NonNull final String name) {
  Parameters.notNull("name", name);   //NOI18N
  return commands.get(name.toUpperCase());
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

private void cacheUpdated(@NonNull final URI file) {
  Parameters.notNull("file", file);   //NOI18N
  synchronized (lock) {
    LOG.log(
      Level.FINE,
      "cacheUpdated: {0}",    //NOI18N
      file);
    assert removedFiles != null;
    removedFiles.add(file);
  }
  
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

@NonNull
public JavaSource createResolver(@NonNull final ClasspathInfo info) {
  JavaSource src = resolver == null ? null : resolver.get();
  if (src == null) {
    LOG.log(Level.FINE,"Javac resolver created.");  //NOI18N
    src = JavaSource.create(info);
    resolver = new SoftReference<>(src);
  }
  return src;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-api-executable

/**
 * Set {@link PhpExecutableValidator.ValidationHandler validation handler} for executable {@link PhpExecutableValidator validator}.
 * <p>
 * The default value is {@code null} (it means use {@link PhpExecutableValidator#validateCommand(String, String) default validation}).
 * @param validationHandler validation handler for executable validation
 * @return the PHP Executable instance itself
 */
public PhpExecutable validationHandler(@NonNull PhpExecutableValidator.ValidationHandler validationHandler) {
  Parameters.notNull("validationHandler", validationHandler); // NOI18N
  this.validationHandler = validationHandler;
  return this;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui

private ProjectReference(
    @NonNull final String classPathId,
    @NonNull final String rawId,
    @NullAllowed final Profile requiredProfile,
    @NonNull final Project prj) {
  super(classPathId, rawId, requiredProfile);
  Parameters.notNull("prj", prj); //NOI18N
  this.prj = prj;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-editor-document

/**
 * Returns a {@link Document} for the given {@link FileObject}.
 * @param file the {@link FileObject} to create {@link Document} for
 * @return the document instance or {@code null}
 */
@CheckForNull
public Document getDocument(@NonNull FileObject file);

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-projectuiapi-base

@Override
@CheckForNull
public Project loadProject(
  @NonNull final FileObject projectDirectory,
  @NonNull final ProjectState state) throws IOException {
  Parameters.notNull("projectDirectory", projectDirectory);   //NOI18N
  Parameters.notNull("state", state); //NOI18N
  final ProjectConvertor.Result res = isProjectImpl(projectDirectory);
  return res != null ?
    new ConvertorProject(projectDirectory, state, res):
    null;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

protected PrefetchableBase(
    @NonNull final String pkgName,
    @NonNull final String name,
    @NullAllowed final Charset encoding,
    final boolean caseSensitive) {
  super(pkgName, name, encoding, caseSensitive);
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

public static <T> T writeAction(@NonNull final Callable<T> action) throws Exception {
  Parameters.notNull("action", action);   //NOI18N
  LOCK.writeLock().lock();
  try {
    LOG.log(Level.FINE, "Write locked by {0}", Thread.currentThread());  //NOI18N
    return action.call();
  } finally {
    LOCK.writeLock().unlock();
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

@Override
public void push(
    @NonNull final URL sibling,
    final boolean inSourceRoot) {
  assert sibling != null;
  siblings.push(Pair.<URL,Boolean>of(sibling,inSourceRoot));
  LOG.log(Level.FINE, "Pushed sibling: {0} size: {1}", new Object[]{sibling, siblings.size()});    //NOI18N
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-projectuiapi-base

/**
 * Create a new {@code ProjectProblemsProviderSupport}.
 *
 * @param source an instance to be given as the source for events, never {@code null}
 */
public ProjectProblemsProviderSupport(@NonNull Object source) {
  Parameters.notNull("source", source);
  propertyChangeSupport = new PropertyChangeSupport(source);
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui

private FileReference(
    @NonNull final String classPathId,
    @NonNull final String rawId,
    @NullAllowed final Profile requiredProfile,
    @NonNull final File file) {
  super(classPathId, rawId, requiredProfile);
  Parameters.notNull("file", file);   //NOI18N
  this.file = file;
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-editor-document

/**
 * Creates a document for the given mime type.
 * @param mimeType the MIME type
 * @return document instance or {@code null}
 */
@CheckForNull
public Document createDocument(@NonNull String mimeType);

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

/**Retrieve a value cached under the given key using the
 * {@link #putCachedValue(java.lang.Object, java.lang.Object, org.netbeans.api.java.source.CompilationInfo.CacheClearPolicy)} method.
 *
 * @param key for which the cached value should be retrieved
 * @return value originally passed to {@link #putCachedValue(java.lang.Object, java.lang.Object, org.netbeans.api.java.source.CompilationInfo.CacheClearPolicy)}, or null if none
 * @since 0.90
 */
public @CheckForNull Object getCachedValue(@NonNull Object key) {
  Parameters.notNull("key", key);
  return impl.getCachedValue(key);
}

相关文章

NonNull类方法