> - return the Java type of a sleep variable
$object = [new LinkedList];
println([$object getClass]);
> - return packages in a jar file
> - return classes in a jar file
This will require a little more work to parse out the jar file and get
packages and classes, however the core is here. This snippet shows
how to parse the entries out of a jar file.
import java.util.jar.*;
import java.io.*;
$jarfile = [new JarFile: [new File: "sleep.jar"]];
$enum = [$jarfile entries];
while ([$enum hasMoreElements])
{
$entry = [$enum nextElement];
$name = [$entry getName];
# $name is the name of the file in the .jar
# $entry isa java.util.zip.ZipEntry
}
> - return methods in a jar file (or in a class in a jar)
$object = [new LinkedList];
printAll([[$object getClass] getMethods]);