org.eigenbase.jmi
Class JmiResourceMap
java.lang.Object
org.eigenbase.jmi.JmiResourceMap
public class JmiResourceMap
- extends Object
JmiResourceMap allows resources to be associated with JMI classes, including
support for inheritance from superclasses.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/jmi/JmiResourceMap.java#8 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelView
private final JmiModelView modelView
map
private final Map<JmiClassVertex,String> map
JmiResourceMap
public JmiResourceMap(JmiModelView modelView,
ResourceBundle bundle,
String prefix,
String suffix)
- Loads a new map from a resource bundle. A resource in the bundle having a
key "[prefix][ClassName][suffix]" will be mapped to the class
corresponding to ClassName.
- Parameters:
modelView
- JMI model whose classes are to be mappedbundle
- source of mappingsprefix
- resource key prefix, or null for nonesuffix
- resource key suffix, or null for none
getResource
public String getResource(RefClass refClass)
- Looks up the resource associated with a class.
- Parameters:
refClass
- class of interest
- Returns:
- associated resource, or null if none