01: /*
02: * InternalRep.java
03: *
04: * This file contains the abstract class declaration for the
05: * internal representations of TclObjects.
06: *
07: * Copyright (c) 1997 Sun Microsystems, Inc.
08: *
09: * See the file "license.terms" for information on usage and
10: * redistribution of this file, and for a DISCLAIMER OF ALL
11: * WARRANTIES.
12: *
13: * RCS: @(#) $Id: InternalRep.java,v 1.4 2000/10/29 06:00:42 mdejong Exp $
14: *
15: */
16:
17: package tcl.lang;
18:
19: /**
20: * This is the interface for implementing internal representation of Tcl
21: * objects. A class that implements InternalRep should define the
22: * following:
23: *
24: * (1) the two abstract methods specified in this base class:
25: * dispose()
26: * duplicate()
27: *
28: * (2) The method toString()
29: *
30: * (3) class method(s) newInstance() if appropriate
31: *
32: * (4) class method set<Type>FromAny() if appropriate
33: *
34: * (5) class method get() if appropriate
35: */
36:
37: public interface InternalRep {
38:
39: /*
40: *----------------------------------------------------------------------
41: *
42: * dispose --
43: *
44: * Free any state associated with the object's internal rep.
45: * This method should not be invoked by user code.
46: *
47: * Results:
48: * None.
49: *
50: * Side effects:
51: * Leaves the object in an unusable state.
52: *
53: *----------------------------------------------------------------------
54: */
55:
56: public void dispose();
57:
58: /*
59: *----------------------------------------------------------------------
60: *
61: * duplicate --
62: *
63: * Make a copy of an object's internal representation.
64: * This method should not be invoked by user code.
65: *
66: * Results:
67: * Returns a newly allocated instance of the appropriate type.
68: *
69: * Side effects:
70: * None.
71: *
72: *----------------------------------------------------------------------
73: */
74:
75: public InternalRep duplicate();
76:
77: } // end InternalRep
|