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; }
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; }
/** * 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; }
/** * 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);
@CheckForNull public static Command forName(@NonNull final String name) { Parameters.notNull("name", name); //NOI18N return commands.get(name.toUpperCase()); }
/** * 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; }
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; }
/** * 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);
@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; }
protected PrefetchableBase( @NonNull final String pkgName, @NonNull final String name, @NullAllowed final Charset encoding, final boolean caseSensitive) { super(pkgName, name, encoding, caseSensitive); }
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(); } }
/** * 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); }
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; }
/** * 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);
/**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); }