org.multijava.mjc
Class CGFCollectionMap
java.lang.Object
org.multijava.util.Utils
org.multijava.mjc.CGFCollectionMap
- All Implemented Interfaces:
- Cloneable
- public class CGFCollectionMap
- extends Utils
This represents a mapping from compilation units and strings to
sets of collections of generic functions: CGFCollectionMap:
CCompilationUnit x String -> { CGFCollection }. Instances of
this are stored within CCompilationUnit instances and
so the mapping is directly from strings to sets of collections of
generic functions.
This is used to process unveiling references to external generic
functions. Each generic function import for a compilation unit
generates an entry in this map. When an unveiling reference is
encountered during typechecking this map is consulted to find the
set of generic function collections that should be made visible.
This is a set since multiple generic functions with the same name
may be imported from different packages. Each collection in the
set is then processed to augment the appropriate classes.
- See Also:
CCompilationUnit,
JCompilationUnit,
CGenericFunctionCollection,
CAugmentationMap
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
backingMap
private CGFCollectionMap.SetMap backingMap
CGFCollectionMap
public CGFCollectionMap()
register
public void register(String ident,
CGenericFunctionCollection coll)
- Adds a mapping from the given
identifier to the
given generic function collection.
registerAll
public void registerAll(String ident,
Set collSet)
- Adds a mapping from the given ident to each of the collections
in the given set.
requires (\forall Object o; collSet.contains(o);
o instanceof CGenericFunctionCollection);
getCollectionsFor
public CGenericFunctionCollection[] getCollectionsFor(String ident)
- Returns all the generic function collections mapped to by
ident.
mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.