org.openide.loaders
Class FileEntry.Numb

java.lang.Object
  |
  +--org.openide.loaders.MultiDataObject.Entry
        |
        +--org.openide.loaders.FileEntry.Numb
All Implemented Interfaces:
Serializable
Enclosing class:
FileEntry

public static final class FileEntry.Numb
extends MultiDataObject.Entry

Simple file entry variant. It does nearly nothing. When a file is copied, it does nothing. If it is moved or renamed it deletes the file.

Useful for representing useless files.

See Also:
Serialized Form

Constructor Summary
FileEntry.Numb(MultiDataObject obj, FileObject fo)
          Create a dummy entry.
 
Method Summary
 FileObject copy(FileObject f, String suffix)
          Does nothing.
 FileObject createFromTemplate(FileObject f, String name)
          Does nothing.
 void delete()
          Removes file.
 boolean isImportant()
          Is not important at all.
 FileObject move(FileObject f, String suffix)
          Removes file.
 FileObject rename(String name)
          Removes file.
 
Methods inherited from class org.openide.loaders.MultiDataObject.Entry
equals, getDataObject, getFile, hashCode, isLocked, takeLock, writeReplace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileEntry.Numb

public FileEntry.Numb(MultiDataObject obj,
                      FileObject fo)
Create a dummy entry.
Parameters:
obj - the data object this entry belongs to
fo - the file object to create an entry for
Method Detail

isImportant

public boolean isImportant()
Is not important at all.
Overrides:
isImportant in class MultiDataObject.Entry
Returns:
false

copy

public FileObject copy(FileObject f,
                       String suffix)
Does nothing.
Overrides:
copy in class MultiDataObject.Entry
Parameters:
f - ignored
suffix - ignored
Returns:
null

rename

public FileObject rename(String name)
                  throws IOException
Removes file.
Overrides:
rename in class MultiDataObject.Entry
Parameters:
name - ignored
Returns:
null
Throws:
IOException - in case of problem

move

public FileObject move(FileObject f,
                       String suffix)
                throws IOException
Removes file.
Overrides:
move in class MultiDataObject.Entry
Parameters:
f - ignored
suffix - ignored
Returns:
null
Throws:
IOException - in case of problem

delete

public void delete()
            throws IOException
Removes file.
Overrides:
delete in class MultiDataObject.Entry
Throws:
IOException - in case of problem

createFromTemplate

public FileObject createFromTemplate(FileObject f,
                                     String name)
Does nothing.
Overrides:
createFromTemplate in class MultiDataObject.Entry
Parameters:
f - ignored
name - ignored
Returns:
null


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.