# HG changeset patch # User Paul Boddie # Date 1106323481 -3600 # Node ID 901001c30474705532495d70a4f51267d5cbb67a # Parent 69dd27ca4d7d0e8588d0cb8887e44fb27d8a5440 Added the start of documentation. diff -r 69dd27ca4d7d -r 901001c30474 docs/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/index.html Fri Jan 21 17:04:41 2005 +0100 @@ -0,0 +1,67 @@ + + + + ClassFile + + + + + +

ClassFile

+ +

The ClassFile collection of packages and utilities provides a means of +importing Java classes and packages directly into Python, without the need +for a Java virtual machine, so that the classes may be instantiated, +accessed, run and manipulated just like Python classes, and that the +resulting objects and methods can be accessed and manipulated just like +Python objects and methods.

+ +

Quick Example

+ +

cd tests/

+ +

javac Value.java

+ +

../runclass.py Value

+ +

v.getValue() correct: 123
+v.getValue() correct: 456
+v.isPositive() correct: 1
+v.isPositive() correct: 0
+v.compare(-790) correct: -1
+v.compare(-788) correct: 1
+v.compare(-789) correct: 0
+v.getValue() == v2.getValue() correct: 0
+v2.add(-123) correct: 0
+v2.getValue() correct: 255

+ +

java Value

+ +

v.getValue() correct: 123
+v.getValue() correct: 456
+v.isPositive() correct: true
+v.isPositive() correct: false
+v.compare(-790) correct: -1
+v.compare(-788) correct: 1
+v.compare(-789) correct: 0
+v.getValue() == v2.getValue() correct: false
+v2.add(-123) correct: 0
+v2.getValue() correct: 255

+ +

Motivation

+ +

Pick one of the following:

+ + + diff -r 69dd27ca4d7d -r 901001c30474 docs/styles.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/styles.css Fri Jan 21 17:04:41 2005 +0100 @@ -0,0 +1,60 @@ +body { +background-color: white; +font-size: 12pt; +} + +h1 { +color: navy; +font-family: sans-serif; +font-size: 20pt; +} + +h2 { +color: navy; +font-family: sans-serif; +font-size: 18pt; +} + +h3 { +color: navy; +font-family: sans-serif; +font-size: 16pt; +} + +h4 { +color: navy; +font-family: sans-serif; +font-size: 15pt; +} + +h5 { +color: navy; +font-family: sans-serif; +font-size: 14pt; +} + +ul { +list-style-type: disc; +} + +pre { +background-color: silver; +color: black; +} + +p.prompt { +font-family: fixed; +background-color: silver; +color: black; +} + +p.prompt:before { +content: "$ "; +} + +p.result { +font-family: fixed; +background-color: white; +color: black; +margin-left: 1em; +}