home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / sun / java2d / loops / GraphicsPrimitiveProxy.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.4 KB  |  33 lines

  1. package sun.java2d.loops;
  2.  
  3. public class GraphicsPrimitiveProxy extends GraphicsPrimitive {
  4.    private Object manager;
  5.    private String relativeClassName;
  6.  
  7.    public GraphicsPrimitiveProxy(Object var1, String var2, int[] var3, String var4) {
  8.       super(var3, (int[])null, var4);
  9.       this.manager = var1;
  10.       this.relativeClassName = var2;
  11.    }
  12.  
  13.    GraphicsPrimitive instantiate() {
  14.       String var1 = this.manager.getClass().getPackage().getName() + "." + this.relativeClassName;
  15.  
  16.       try {
  17.          Class var2 = Class.forName(var1);
  18.          GraphicsPrimitive var3 = (GraphicsPrimitive)var2.newInstance();
  19.          if (!((GraphicsPrimitive)this).satisfiesSameAs(var3)) {
  20.             throw new RuntimeException("Primitive " + var3 + " incompatible with proxy for " + var1);
  21.          } else {
  22.             return var3;
  23.          }
  24.       } catch (ClassNotFoundException var5) {
  25.          throw new RuntimeException(((Throwable)var5).toString());
  26.       } catch (InstantiationException var6) {
  27.          throw new RuntimeException(((Throwable)var6).toString());
  28.       } catch (IllegalAccessException var7) {
  29.          throw new RuntimeException(((Throwable)var7).toString());
  30.       }
  31.    }
  32. }
  33.