|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.h2b.taglets.CrossRefMap
@ClassLabel(copyright="Copyright (C) 2008 Hans-Hermann Bode", ident="$Id: CrossRefMap.java,v 1.5 2008/12/14 17:05:37 h2b Exp $") public final class CrossRefMap
A singleton that provides for a unique map of CrossRefTable
s.
The only instance of this object is returned by the getInstance
method. Besides methods getTable
for retrieving tables from the
map (which also populate the map with tables as needed), there is a
(load
/save
mechanism for the map as a whole which can be
used instead of the corresponding mechanism of CrossRefTable
to avoid flooding the directories with auxiliary files.
CrossRefTable
Method Summary | |
---|---|
static CrossRefMap |
getInstance()
Returns the only instance of this singleton. |
CrossRefTable |
getTable(java.lang.String key)
Returns the cross-ref table associated to a given key. |
CrossRefTable |
getTable(java.lang.String key,
java.lang.String path)
Returns the cross-ref table associated to a given key. |
void |
load(java.io.File f)
Loads the map from a file. |
void |
save(java.io.File f)
Saves the map to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CrossRefMap getInstance()
public CrossRefTable getTable(java.lang.String key)
CrossRefTable
as value.
key
- the key whose table is in demand
CrossRefTable
associated with the keypublic CrossRefTable getTable(java.lang.String key, java.lang.String path)
CrossRefTable(path)
as value.
If path
is null
, that value is CrossRefTable()
.
key
- the key whose table is in demandpath
- the pathname of the auxiliary file for storing the table
CrossRefTable
associated with the keyCrossRefTable.CrossRefTable(String)
public void load(java.io.File f)
f
- the file the map is to be loaded frompublic void save(java.io.File f)
null
, nothing happens.
If an exception occurs, a warning message is output.
f
- the file the map is to be saved to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |