org.eigenbase.jmi
Class JmiResourceMap

java.lang.Object
  extended by 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

Field Summary
private  Map<JmiClassVertex,String> map
           
private  JmiModelView modelView
           
 
Constructor Summary
JmiResourceMap(JmiModelView modelView, ResourceBundle bundle, String prefix, String suffix)
          Loads a new map from a resource bundle.
 
Method Summary
 String getResource(RefClass refClass)
          Looks up the resource associated with a class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelView

private final JmiModelView modelView

map

private final Map<JmiClassVertex,String> map
Constructor Detail

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 mapped
bundle - source of mappings
prefix - resource key prefix, or null for none
suffix - resource key suffix, or null for none
Method Detail

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