koala.dynamicjava.interpreter
Class ClassInfoCompiler

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

public class ClassInfoCompiler
extends java.lang.Object

This class translates a class info into a Class object


Inner Class Summary
protected  class ClassInfoCompiler.ConstructorVisitor
          To build the constructors
protected  class ClassInfoCompiler.MembersVisitor
          To visit the members of a type declaration
 
Field Summary
protected  ClassFactory classFactory
          The class factory
protected  TreeClassFinder classFinder
          The class finder
protected  TreeClassInfo classInfo
          The class info to compile
protected  java.util.List classInitializer
          The class initializer expressions
protected  boolean hasAbstractMethod
          Is the underlying class contain an abstract method?
protected  ImportationManager importationManager
          The importation manager
protected  java.util.List instanceInitializer
          The instance initializer expressions
protected  TreeInterpreter interpreter
          The interpreter
protected  boolean isInterface
          Is the class info represents an interface ?
protected  ClassInfoCompiler.MembersVisitor membersVisitor
          The members visitor
protected  TypeDeclaration typeDeclaration
          The tree of the class to compile
 
Constructor Summary
ClassInfoCompiler(ClassInfo ci)
          Creates a new compiler
 
Method Summary
protected  void addConstructor(TreeConstructorInfo ci)
          Adds a constructor to the current class
protected  void addInnerClassesAttribute(ClassInfo ci)
          Adds an inner class attribute to the given class
protected  void addToClassInitializer(Node n)
          Adds a statement to the class initializer
protected  void addToInstanceInitializer(Node n)
          Adds a statement to the instance initializer
 java.lang.Class compile()
          Creates a Class object from the classInfo attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classInfo

protected TreeClassInfo classInfo
The class info to compile

typeDeclaration

protected TypeDeclaration typeDeclaration
The tree of the class to compile

classFactory

protected ClassFactory classFactory
The class factory

classFinder

protected TreeClassFinder classFinder
The class finder

interpreter

protected TreeInterpreter interpreter
The interpreter

isInterface

protected boolean isInterface
Is the class info represents an interface ?

hasAbstractMethod

protected boolean hasAbstractMethod
Is the underlying class contain an abstract method?

classInitializer

protected java.util.List classInitializer
The class initializer expressions

instanceInitializer

protected java.util.List instanceInitializer
The instance initializer expressions

membersVisitor

protected ClassInfoCompiler.MembersVisitor membersVisitor
The members visitor

importationManager

protected ImportationManager importationManager
The importation manager
Constructor Detail

ClassInfoCompiler

public ClassInfoCompiler(ClassInfo ci)
Creates a new compiler
Parameters:
ci - the class info to compile
Method Detail

compile

public java.lang.Class compile()
Creates a Class object from the classInfo attribute
Returns:
the created class

addConstructor

protected void addConstructor(TreeConstructorInfo ci)
Adds a constructor to the current class
Parameters:
ci - the constructor info

addInnerClassesAttribute

protected void addInnerClassesAttribute(ClassInfo ci)
Adds an inner class attribute to the given class

addToClassInitializer

protected void addToClassInitializer(Node n)
Adds a statement to the class initializer
Parameters:
n - the statement to add

addToInstanceInitializer

protected void addToInstanceInitializer(Node n)
Adds a statement to the instance initializer
Parameters:
n - the statement to add


Copyright © 2001 Stephane Hillion. All Rights Reserved.