Class ModelContext


  • public class ModelContext
    extends java.lang.Object
    A context for storing ephemeral information about a model.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> ReferenceCache<T> cache​(java.lang.Class<T> clazz)
      Return the cache for a particular reference type.
      java.util.Set<java.lang.Class> containedRefs()
      List the reference types contained in the context.
      static void create​(java.util.Map<java.lang.Class,​ReferenceCache> m)
      create a new model context with the associated reference cache.
      static ModelContext current()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static void create​(java.util.Map<java.lang.Class,​ReferenceCache> m)
        create a new model context with the associated reference cache.
        Parameters:
        m - the reference cache.
      • cache

        public <T> ReferenceCache<T> cache​(java.lang.Class<T> clazz)
        Return the cache for a particular reference type.
        Type Parameters:
        T - the type of the reference.
        Parameters:
        clazz - the type of the reference.
        Returns:
        the cache.
      • containedRefs

        public java.util.Set<java.lang.Class> containedRefs()
        List the reference types contained in the context.
        Returns:
        the set of types.