/** Find a resource in repository, ignoring not capable filesystems. * @param resName name of the resource * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public FileObject findResource(String resName) { Enumeration<? extends FileSystem> en = fileSystems(); while (en.hasMoreElements()) { FileSystem fs = en.nextElement(); FileObject fo = fs.findResource(resName); if (fo != null) { // object found return fo; } } return null; }
/** Allows subclasses to change a set of capabilities of the * filesystem. * @param capability the capability to use * @deprecated Capabilities are no longer used. */ @Deprecated protected final void setCapability(FileSystemCapability capability) { if (this.capability != null) { ((FileSystemCapability) this.capability).removePropertyChangeListener(getCapabilityChangeListener()); } this.capability = capability; if (this.capability != null) { ((FileSystemCapability) this.capability).addPropertyChangeListener(getCapabilityChangeListener()); } }
/** Reads object from stream and creates listeners. * @param in the input stream to read from * @exception IOException error during read * @exception ClassNotFoundException when class not found */ @SuppressWarnings("deprecation") private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { in.defaultReadObject(); if (capability != null) { ((FileSystemCapability) capability).addPropertyChangeListener(getCapabilityChangeListener()); } }
/** The object describing capabilities of this filesystem. * Subclasses cannot override it. * @return object describing capabilities of this filesystem. * @deprecated Capabilities are no longer used. */ @Deprecated public final FileSystemCapability getCapability() { if (capability == null) { capability = new FileSystemCapability.Bean(); ((FileSystemCapability) capability).addPropertyChangeListener(getCapabilityChangeListener()); } return (FileSystemCapability) capability; }
/** Searches for the given resource among all filesystems * that satifies this capability, returning all matches. * @param name name of the resource * @return enumeration of {@link FileObject}s * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public Enumeration<? extends FileObject> findAllResources(String name) { Vector<FileObject> v = new Vector<FileObject>(8); Enumeration<? extends FileSystem> en = fileSystems(); while (en.hasMoreElements()) { FileSystem fs = en.nextElement(); FileObject fo = fs.findResource(name); if (fo != null) { v.addElement(fo); } } return v.elements(); }
/** Allows subclasses to change a set of capabilities of the * filesystem. * @param capability the capability to use * @deprecated Capabilities are no longer used. */ protected final void setCapability (FileSystemCapability capability) { if (this.capability != null) this.capability.removePropertyChangeListener(getCapabilityChangeListener ()); this.capability = capability; if (this.capability != null) this.capability.addPropertyChangeListener (getCapabilityChangeListener ()); }
/** Reads object from stream and creates listeners. * @param in the input stream to read from * @exception IOException error during read * @exception ClassNotFoundException when class not found */ private void readObject (java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { in.defaultReadObject (); if (capability != null) { capability.addPropertyChangeListener(getCapabilityChangeListener()); } }
/** Finds all files among all filesystems with this capability * that match a given name, returning all matches. * All filesystems are queried with {@link FileSystem#find}. * * @param aPackage package name where each package is separated by a dot * @param name name of the file (without dots) or <CODE>null</CODE> if * one wants to obtain the name of a package and not a file in it * @param ext extension of the file or <CODE>null</CODE> if one needs * a package and not a file name * * @return enumeration of {@link FileObject}s * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public final Enumeration<? extends FileObject> findAll(String aPackage, String name, String ext) { Enumeration<? extends FileSystem> en = fileSystems(); Vector<FileObject> ret = new Vector<FileObject>(); while (en.hasMoreElements()) { FileSystem fs = (FileSystem) en.nextElement(); FileObject fo = fs.find(aPackage, name, ext); if (fo != null) { ret.addElement(fo); } } return ret.elements(); }
/** Allows subclasses to change a set of capabilities of the * filesystem. * @param capability the capability to use * @deprecated Capabilities are no longer used. */ protected final void setCapability (FileSystemCapability capability) { if (this.capability != null) this.capability.removePropertyChangeListener(getCapabilityChangeListener ()); this.capability = capability; if (this.capability != null) this.capability.addPropertyChangeListener (getCapabilityChangeListener ()); }
/** Reads object from stream and creates listeners. * @param in the input stream to read from * @exception IOException error during read * @exception ClassNotFoundException when class not found */ private void readObject (java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { in.defaultReadObject (); if (capability != null) { capability.addPropertyChangeListener(getCapabilityChangeListener()); } }
/** Finds file when its name is provided. It scans in the list of * filesystems and asks them for the specified file by a call to * {@link FileSystem#find find}. The first object that is found is returned or <CODE>null</CODE> * if none of the filesystems contain such a file. * * @param aPackage package name where each package is separated by a dot * @param name name of the file (without dots) or <CODE>null</CODE> if * one wants to obtain the name of a package and not a file in it * @param ext extension of the file or <CODE>null</CODE> if one needs * a package and not a file name * * @return {@link FileObject} that represents file with given name or * <CODE>null</CODE> if the file does not exist * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public final FileObject find(String aPackage, String name, String ext) { Enumeration<? extends FileSystem> en = fileSystems(); while (en.hasMoreElements()) { FileSystem fs = en.nextElement(); FileObject fo = fs.find(aPackage, name, ext); if (fo != null) { // object found return fo; } } return null; }
/** Allows subclasses to change a set of capabilities of the * filesystem. * @param capability the capability to use * @deprecated Capabilities are no longer used. */ @Deprecated protected final void setCapability(FileSystemCapability capability) { if (this.capability != null) { ((FileSystemCapability) this.capability).removePropertyChangeListener(getCapabilityChangeListener()); } this.capability = capability; if (this.capability != null) { ((FileSystemCapability) this.capability).addPropertyChangeListener(getCapabilityChangeListener()); } }
/** Reads object from stream and creates listeners. * @param in the input stream to read from * @exception IOException error during read * @exception ClassNotFoundException when class not found */ @SuppressWarnings("deprecation") private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { in.defaultReadObject(); if (capability != null) { ((FileSystemCapability) capability).addPropertyChangeListener(getCapabilityChangeListener()); } }
/** Find a resource in repository, ignoring not capable filesystems. * @param resName name of the resource * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public FileObject findResource(String resName) { Enumeration<? extends FileSystem> en = fileSystems(); while (en.hasMoreElements()) { FileSystem fs = en.nextElement(); FileObject fo = fs.findResource(resName); if (fo != null) { // object found return fo; } } return null; }
/** The object describing capabilities of this filesystem. * Subclasses cannot override it. * @return object describing capabilities of this filesystem. * @deprecated Capabilities are no longer used. */ @Deprecated public final FileSystemCapability getCapability() { if (capability == null) { capability = new FileSystemCapability.Bean(); ((FileSystemCapability) capability).addPropertyChangeListener(getCapabilityChangeListener()); } return (FileSystemCapability) capability; }
/** Find a resource in repository, ignoring not capable filesystems. * @param resName name of the resource * @deprecated Please use the <a href="@JAVA/API@/org/netbeans/api/java/classpath/api.html">ClassPath API</a> instead. */ public FileObject findResource (String resName) { Enumeration en = fileSystems (); while (en.hasMoreElements ()) { FileSystem fs = (FileSystem)en.nextElement (); FileObject fo = fs.findResource(resName); if (fo != null) { // object found return fo; } } return null; }
/** The object describing capabilities of this filesystem. * Subclasses cannot override it. * @deprecated Capabilities are no longer used. */ public final FileSystemCapability getCapability () { if (capability == null) { capability = new FileSystemCapability.Bean(); capability.addPropertyChangeListener(getCapabilityChangeListener()); } return capability; }
/** Find a resource in repository, ignoring not capable filesystems. * @param resName name of the resource * @deprecated Please use the <a href="@JAVA/API@/org/netbeans/api/java/classpath/api.html">ClassPath API</a> instead. */ public FileObject findResource (String resName) { Enumeration en = fileSystems (); while (en.hasMoreElements ()) { FileSystem fs = (FileSystem)en.nextElement (); FileObject fo = fs.findResource(resName); if (fo != null) { // object found return fo; } } return null; }
/** The object describing capabilities of this filesystem. * Subclasses cannot override it. * @deprecated Capabilities are no longer used. */ public final FileSystemCapability getCapability () { if (capability == null) { capability = new FileSystemCapability.Bean(); capability.addPropertyChangeListener(getCapabilityChangeListener()); } return capability; }
/** Searches for the given resource among all filesystems * that satifies this capability, returning all matches. * @param name name of the resource * @return enumeration of {@link FileObject}s * @deprecated Please use the <a href="@org-netbeans-api-java-classpath@/org/netbeans/api/java/classpath/ClassPath.html">ClassPath API</a> instead. */ @Deprecated public Enumeration<? extends FileObject> findAllResources(String name) { Vector<FileObject> v = new Vector<FileObject>(8); Enumeration<? extends FileSystem> en = fileSystems(); while (en.hasMoreElements()) { FileSystem fs = en.nextElement(); FileObject fo = fs.findResource(name); if (fo != null) { v.addElement(fo); } } return v.elements(); }