|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectav.meta.MetaRepository
public class MetaRepository
MetaRepository is the backbone of Ableverse Meta Facility.
The MetaBundle class has one static instance of this class of
its own to provide the default meta bundle access (via
MetaBundle.get() series of methods).
If you want to construct a new meta infrastructure by yourself based on
Ableverse Meta Facility, this is the start point. You will
first look at existing MetaLoader implementations to see if
one meets your resource storage type, and if none, you'll have to implement
MetaLoader for your storage type by yourself. And the next is
to instanciate such a loader and pass it to
MetaRepository(String,MetaLoader) to construct an instance of this
class. Finally the get() series methods will give you
MetaBundle instances by bundle names.
| Field Summary | |
|---|---|
static String |
DEFAULT_PACKAGE_META_NAME
The meta bundle name associated with the java default
package, the value is: "default" |
| Constructor Summary | |
|---|---|
MetaRepository(String fileExt,
MetaLoader loader)
Construct a new instance of the repository. |
|
| Method Summary | |
|---|---|
MetaBundle |
get()
Get the meta bundle in this repository, with the same name as the calling class |
MetaBundle |
get(Class<?> klass)
Get the meta bundle in this repository, with the same canonical name as klass |
MetaBundle |
get(Package pkg)
Get the meta bundle in this repository, with the same name as pkg |
MetaBundle |
get(String name)
Get the meta bundle with the specified name |
String |
getFileExtensionName()
Return the file extension name specified at construction. |
void |
reload()
Clear the cache of each bundle loaded from this repository so that subsequent lookups on them will read fresh infromation from the XML file set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_PACKAGE_META_NAME
default
package, the value is: "default"
| Constructor Detail |
|---|
public MetaRepository(String fileExt,
MetaLoader loader)
fileExt - to specify a file extension name for this repositoryloader - a valid meta loader| Method Detail |
|---|
public MetaBundle get(Class<?> klass)
klass
klass - any java class
klasspublic MetaBundle get(Package pkg)
pkg
pkg - any java package
pkgpublic MetaBundle get()
Note this relies on the Throwable.getStackTrace() to
determine which class is invoking this method. It is perfectly supported
by modern HotSpot™
Java™ Virtual Machines, but not so luckly with legacy JIT JVMs.
Programs using this method will malfunction in such legacy JVMs.
public MetaBundle get(String name)
name
name - name of the meta bundle to get
namepublic void reload()
This is useful to refresh the meta information without restart the running program.
public String getFileExtensionName()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||