|
|||||||||
| Home >> All >> javax >> ide >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.ide.net
Interface URIFactory.NameGenerator

- Enclosing interface:
- URIFactory
- public static interface URIFactory.NameGenerator
This is a callback interface used by the URIFactory while it is in the process of producing a new unique URI.
| Method Summary | |
java.lang.String |
nextName()
This method is called by URIFactory from one of its newUniqueURI() methods to obtain a relative
file name. |
| Method Detail |
nextName
public java.lang.String nextName()
- This method is called by URIFactory from one of its
newUniqueURI()methods to obtain a relative file name. The name is usually just a simple file name without any preceeding directory names, that will be used in the process of generating a unique java.net.URI.The URIFactory is responsible for assembling a complete
URIby combining a baseURIwith the relative file name returned bynextName(). The URIFactory is also responsible for checking that the newly createdURIis unique among files on disk and within the IDE's caches. If the newURIis not unique, then URIFactory will issue another call tonextName()to get a new name. This process is repeated until either a uniqueURIis produced, or the URIFactory "times out" on theNameGeneratorimplementation after a very large number of iterations fails to produce a uniqueURI.Therefore to interact properly with URIFactory, the
nextName()implementation must return a different name each time it is invoked. More specifically, a particular instance ofNameGeneratorshould not return any name more than once from itsnextName()method. Of course, this restriction does not apply across different instances ofNameGenerator.The exact means by which a new name is produced is not specified and is left to the specific
NameGeneratorclasses. However, thenextName()method should not attempt to create anURIand check for its uniqueness, as this may lead to problems in the future when the URIFactory and VirtualFileSystem classes are enhanced. For example, if individualNameGeneratorimplementations are attempting to determine uniqueness, bugs may surface later if the IDE's algorithm for determining uniqueness changes. How the IDE determinesURIuniqueness is not documented and should be considered an implementation detail of the IDE framework.
|
|||||||||
| Home >> All >> javax >> ide >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC