code: public static SeaGlassContext getContext(Class type, JComponent component, Region region, SynthStyle style, int state) {
          SeaGlassContext context = null;
  
          synchronized (contextMap) {
              List instances = (List) contextMap.get(type);
  
              if (instances != null) {
                  int size = instances.size();
  
                  if (size > 0) {
                      context = (SeaGlassContext) instances.remove(size - 1);
                  }
              }
          }
  
          if (context == null) {
  
              try {
                  context = (SeaGlassContext) type.newInstance();
              } catch (IllegalAccessException iae) {
                  iae.printStackTrace();
              } catch (InstantiationException ie) {
                  ie.printStackTrace();
              }
          }
  
          context.reset(component, region, style, state);
  
          return context;
      }
docs: The method used to get a context.
  
  @param  type      the class of the context.
  @param  component the component.
  @param  region    the region.
  @param  style     the style.
  @param  state     the state.
  
  @return the newly constructed context, corresponding to the arguments.