| |||
Java Specifics Compilation EngineHome FAQ Download Whitepaper - Read First (pdf) Available Specifics: {AnyString}World ![]() {AnyClass}ArrayList ![]() {AnyPrimitive}ArrayList ![]() {AnyClass}LinkedList ![]() {AnyPrimitive}LinkedList ![]() Contact: classhat at outscheme.com |
What is this all about?? This system provides you the ability to generate classes based on some template. For example, let's say you want a StringArrayList but can't use JDK1.5 generics. This system can (with one command) generate that class and appropriate iterators.
What is Classhat? Classhat is a compilation engine for Java Specifics.
Java Specifics is a Java source code templating system. Note that classhat is often termed a
"compiler", this is not technically correct as it uses some other java compiler under the hood.
However its use looks and feels like it is a compiler.
What are 'Available Specifics' on the left sidebar? The classhat compiler requires input specifics (i.e., templates) in order to generate classes.
Theses specifics might be provided with the compilation engine -or- could be written by
you or third-parties.
So I can use classhat in this online version OR as a command-line tool? Right. The command-line tool will prove to be far more useful as you can write and
configure exactly which specifics are available.
So what should I enter in the "classname to generate" box? Take a look at the available specifics and see what each one accepts. For example
{AnyClass}LinkedList takes the name of any class that classhat can find. If you enter
a classname it cannot find (or otherwise random string) you will see the compiler output
indicating this when you hit enter. Try entering StringLinkedList - since classhat can
find java.lang.String, it should generate the classes without a problem.
I want to import a package something not in the list on the left! Just sneak it into the URL in the 'imp=' parameter. This interface only allows me to use classes from the standard Java packages. How can I make a MyClassArrayList? Either turn on mock generation of classes (i.e., checkbox on the sidebar) or download the application which can then see your classpath. How do I generate a class so its not in the default package? Just ask for it. If you type in StringArrayList, it will be in the default package. If you type in com.yourcompany.StringArrayList, it will be in the com.yourcompany package. Can I run the classes that are generated? If they are executable, yes. Obviously, many collections classes aren't usually executable. But the {AnyString}World specific is. Try CarWorld or HelloWorld or SomeWeirdCrazyWorld. Download the class and execute it. What exactly are 'specifics'? They are Java source code templates. Click the icon next to each name in the 'Available Specifics' at the left to see their source code. They look pretty much like standard Java with bracketed strings sprinkled throughout. You give the source, but it says I probably can't compile it. Why not? Actually - you almost always can compile it, but it might not execute correctly if you
do it that way. The specifics engine always outputs valid Java code. And in many cases
such as the {AnyString}World specific, you can compile and run that source yourself.
|