DynamicJava Javadoc: Class TreeCompiler

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## koala.dynamicjava.interpreter
Class TreeCompiler

    java.lang.Object
      |
      +--koala.dynamicjava.interpreter.TreeCompiler

public class TreeCompiler
extends java.lang.Object

This class contains methods to manage the creation of classes.

Inner Class Summary
`protected class` | `TreeCompiler.ClassInfoLoader` To load class infos instead of classes
`protected class` | `TreeCompiler.CompilationUnitVisitor` To create the class infos for a compilation unit
`class` | `TreeCompiler.PseudoError` To test the existance of a class without loading it

Field Summary
`protected TreeCompiler.ClassInfoLoader` | `classInfoLoader` The class info loader
`protected TreeClassLoader` | `classLoader` The classloader
`protected ClassPool` | `classPool` The class pool
`protected Interpreter` | `interpreter` The interpreter

Constructor Summary
`TreeCompiler(Interpreter i)` Creates a new compiler

Method Summary
`protected boolean` | `classExists(java.lang.String name)` Whether a class exists in a compiled form
`java.lang.Class` | `compile(java.lang.String name)` Compiles a compilation unit
`protected java.lang.Class` | `compileClass(ClassInfo ci, java.lang.String name)` Compiles the given class info
`java.lang.Class` | `compileClasses(java.lang.String name)` Compiles all the classes in the class pool
`java.lang.Class` | `compileTree(Context ctx, TypeDeclaration td)` Compiles a single class
`protected void` | `loadClass(java.lang.String name)` Searches for a class, loads its class info structure

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### interpreter

    protected Interpreter interpreter

  The interpreter

### classLoader

    protected TreeClassLoader classLoader

  The classloader

### classInfoLoader

    protected TreeCompiler.ClassInfoLoader classInfoLoader

  The class info loader

### classPool

    protected ClassPool classPool

  The class pool

Constructor Detail

### TreeCompiler

    public TreeCompiler(Interpreter i)

  Creates a new compiler
  Parameters:
    `i` - the current interpreter

Method Detail

### compile

    public java.lang.Class compile(java.lang.String name)
                            throws java.lang.ClassNotFoundException

  Compiles a compilation unit
  Parameters:
    `name` - the name of the class to compile

### compileClasses

    public java.lang.Class compileClasses(java.lang.String name)
                                   throws java.lang.ClassNotFoundException

  Compiles all the classes in the class pool
  Parameters:
    `name` - the name of the class to return

### compileTree

    public java.lang.Class compileTree(Context ctx,
                                       TypeDeclaration td)

  Compiles a single class
  Parameters:
    `td` - the type declaration
    `im` - the importation manager

### compileClass

    protected java.lang.Class compileClass(ClassInfo ci,
                                           java.lang.String name)

  Compiles the given class info
  Parameters:
    `ci` - the class info to compile
    `name` - the name of the class to return

### classExists

    protected boolean classExists(java.lang.String name)

  Whether a class exists in a compiled form

### loadClass

    protected void loadClass(java.lang.String name)
                      throws java.lang.ClassNotFoundException

  Searches for a class, loads its class info structure

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Stephane Hillion. All Rights Reserved.