| Home >> All |
silk: Javadoc index of package silk.
Package Samples:
silk
Classes:
Listener11swing: This class allows a Procedure to act as a listener to all SWING and AWT events. For example, to add an action listener to a button, b: (import "java.awt.*") (import "javax.swing.*") (let ((f (JFrame. "Example")) (b (JButton. "Press Me"))) (.addActionListener b (Listener11swing. (lambda (e) (.println (System.$out) "Yow!")))) (.add (.getContentPane f) b (BorderLayout.$CENTER)) (.pack f) (.show f))) NOTE: Listener11swing.java IS GENERATED FROM listener.scm. EDIT AT YOUR OWN RISK.
Listener11: This class allows a Procedure to act as a listener to all SWING and AWT events. For example, to add an action listener to a button, b: (import "java.awt.*") (import "javax.swing.*") (let ((f (JFrame. "Example")) (b (JButton. "Press Me"))) (.addActionListener b (Listener11. (lambda (e) (.println (System.$out) "Yow!")))) (.add (.getContentPane f) b (BorderLayout.$CENTER)) (.pack f) (.show f))) NOTE: Listener11.java IS GENERATED FROM listener.scm. EDIT AT YOUR OWN RISK.
Listener: This class allows a Procedure to act as a listener to all SWING and AWT events. For example, to add an action listener to a button, b: (import "java.awt.*") (import "javax.swing.*") (let ((f (JFrame. "Example")) (b (JButton. "Press Me"))) (.addActionListener b (Listener. (lambda (e) (.println (System.out$) "Yow!")))) (.add (.getContentPane f) b (BorderLayout.CENTER$)) (.pack f) (.show f))) NOTE: Listener.java IS GENERATED FROM listener.scm. EDIT AT YOUR OWN RISK.
LocalVariable: A LocalVariable is denoted by its position in the environment, in terms of the number of levels "up" we have to go (number of nested environments), the number of variables "in" we have to go (ordinal position of variable), and whether the variable is a "rest" (or "dotted") variable. Example of variables in (list x y z a b) : (lambda (x y) x.up=2, x.in=0 y.up=2, y.in=1 (lambda (z . a) z.up=1, z.in=0 a.up=1, a.in=1 (lambda b b.up=0, b.in=0 (list x y z a b))))
Invoke: Provides dynamic Java method invocation through Java's Reflection interface. For a good discussion of a Scheme implementation, and the issues involved with dynamic method invocation in Java see: Michael Travers, Java Q & A, Dr. Dobb's Journal, Jan., 2000, p. 103-112. Primitive types are not widened because it would make method selection more ambiguous. By memoizing constructorTable() and methodTable() dynamic method lookup can be done without consing.
Pair: A Pair has two fields, first and rest (sometimes called car and cdr). The empty list is represented as a Pair, with both fields empty. (In Scheme it is an error to ask access those fields, but we don't complain.)
Symbol: In Silk 1.0 to 1.4, symbols were implemented as Strings. In 1.5, we add a Symbol class, with a field for the global value. This makes global lookup faster, but limits us to only one global environment.
Closure: A closure is a user-defined procedure. It is "closed" over the environment in which it was created. To apply the procedure, bind the parameters to the passed in variables, and evaluate the body.
Environment: Environments store mappings from symbols to locations. At compile time, we can lookup to see if a symbol names a location, and at run time we can get or set the value in a location.
JavaListener: This is the parent class for the Java Listeners. There are several subclasses corresponding to each of the various extensions of Java. Each extension adds a few listeners.
Procedure: Abstract superclass of Procedures. Procedures of no arguments, called "thunks", implement the Runnable interface. To invoke a Procedure from Java, use apply(Pair).
SchemeApplet: this class defines an applet which will read a file name from the applet parameter list and will invoke the SILK interpreter on that file
Primitive: Primitive procedures (as defined in the R4RS Scheme report. NOTE: Primitive.java IS GENERATED FROM primitives.scm. EDIT AT YOUR OWN RISK.
BacktraceException: A silk.BacktraceException is used to capture and report on uncaught Exceptions thrown in a silk program.
JavaMethod: This class allows you to call any Java method, just by naming it, and doing the dispatch at runtime.
LCO: A aupport class for the Scheme->Java compiler used to implement the last call optimization
SilkThrowable: A silk.SilkThrowable is used to support throwing and catching of objects in Silk programs.
JavaField: Provides dynamic field access. Static fields could be cached.
InputPort: InputPort is to Scheme as InputStream is to Java.
Function: A support class for the Scheme->Java compiler
Scheme: This class represents a Scheme interpreter.
JavaConstructor: Provides dynamic constructors.
Continuation
Generic
Import
| Home | Contact Us | Privacy Policy | Terms of Service |