Package adams.gui.goe
Class GlobalInfoCache
- java.lang.Object
-
- adams.gui.goe.GlobalInfoCache
-
public class GlobalInfoCache extends Object
For caching the global info of classes.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected Hashtable<String,Boolean>m_Availablethe classname <-> global info available relation.protected Hashtable<String,String>m_GlobalInfothe classname <-> global info relation.protected static GlobalInfoCachem_Singletonthe singleton.static StringMETHOD_GLOBALINFOthe globalInfo method.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(Class cls)Returns the global info for the specified class.Stringget(String clsname)Returns the global info for the specified class.static GlobalInfoCachegetSingleton()Returns the singleton instance.booleanhas(Class cls)Checks whether the class offers a global info.booleanhas(String clsname)Checks whether the class offers a global info.
-
-
-
Field Detail
-
METHOD_GLOBALINFO
public static final String METHOD_GLOBALINFO
the globalInfo method.- See Also:
- Constant Field Values
-
m_GlobalInfo
protected Hashtable<String,String> m_GlobalInfo
the classname <-> global info relation.
-
m_Available
protected Hashtable<String,Boolean> m_Available
the classname <-> global info available relation.
-
m_Singleton
protected static GlobalInfoCache m_Singleton
the singleton.
-
-
Method Detail
-
has
public boolean has(Class cls)
Checks whether the class offers a global info.- Parameters:
cls- the class to check- Returns:
- true if the class offers global info
-
has
public boolean has(String clsname)
Checks whether the class offers a global info.- Parameters:
clsname- the class to check- Returns:
- true if the class offers global info
-
get
public String get(Class cls)
Returns the global info for the specified class.- Parameters:
cls- the class to get the info for- Returns:
- the info, null if not available
-
get
public String get(String clsname)
Returns the global info for the specified class.- Parameters:
clsname- the class to check- Returns:
- the info, null if not available
-
getSingleton
public static GlobalInfoCache getSingleton()
Returns the singleton instance.- Returns:
- the singleton
-
-