org.openide.loaders
Class FileEntry.Format
java.lang.Object
|
+--org.openide.loaders.MultiDataObject.Entry
|
+--org.openide.loaders.FileEntry
|
+--org.openide.loaders.FileEntry.Format
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- FileEntry
- public abstract static class FileEntry.Format
- extends FileEntry
Specialized entry that simplifies substitution when a file entry
is created from template.
Subclasses must implement
createFormat(org.openide.filesystems.FileObject, java.lang.String, java.lang.String) and return a valid text format that
will be used for converting the lines of the original file
to lines in the newly created one.
- See Also:
- Serialized Form
FileEntry.Format
public FileEntry.Format(MultiDataObject obj,
FileObject fo)
- Create a new entry initially attached to a given file object.
- Parameters:
obj - the data object this entry belongs tofo - the file object for the entry
createFromTemplate
public FileObject createFromTemplate(FileObject f,
String name)
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be created from a template.
Depending on the entry type, it should either copy the underlying
FileObject,
or do nothing (if it cannot be copied).
- Overrides:
createFromTemplate in class FileEntry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Parameters:
f - the folder to create this entry inname - the new name to use- Returns:
- the copied
FileObject or null if it cannot be copied - Throws:
IOException - when the operation fails
createFormat
protected abstract Format createFormat(FileObject target,
String n,
String e)
- Provide a suitable format for
substitution of lines.
- Parameters:
target - the target folder of the installationn - the name the file will havee - the extension the file will have- Returns:
- a format to use for formatting lines
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.