uk.co.badgersinfoil.metaas
Class ASSourceFactory

java.lang.Object
  extended byuk.co.badgersinfoil.metaas.ASSourceFactory

public class ASSourceFactory
extends java.lang.Object

Core class providing access to metaas functionality.


Constructor Summary
ASSourceFactory()
           
 
Method Summary
 CompilationUnit newClass(java.lang.String qualifiedClassName)
          Creates a new CompilationUnit which defines a class with the given name.
 CompilationUnit newInterface(java.lang.String qualifiedInterfaceName)
          Creates a new CompilationUnit which defines an interface with the given name.
 CompilationUnit parse(java.io.Reader in)
          Parse an entire ActionScript source file from the given Reader, returning a from CompilationUnit which details of the type contained in the file can be obtained.
 void write(java.io.Writer writer, CompilationUnit cu)
          Writes the ActionScript code in the given CompilationUnit to the given Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASSourceFactory

public ASSourceFactory()
Method Detail

parse

public CompilationUnit parse(java.io.Reader in)
Parse an entire ActionScript source file from the given Reader, returning a from CompilationUnit which details of the type contained in the file can be obtained.


newClass

public CompilationUnit newClass(java.lang.String qualifiedClassName)
Creates a new CompilationUnit which defines a class with the given name. To populate the new class, you can do something like,
 CompilationUnit cu = fact.newClass("MyTest");
 ASTClassType myclass = (ASTClassType)cu.getType();
 // ... add stuff to myclass  ...
 


write

public void write(java.io.Writer writer,
                  CompilationUnit cu)
           throws java.io.IOException
Writes the ActionScript code in the given CompilationUnit to the given Writer.

Throws:
java.io.IOException

newInterface

public CompilationUnit newInterface(java.lang.String qualifiedInterfaceName)
Creates a new CompilationUnit which defines an interface with the given name. To populate the new interface, you can do something like,
 CompilationUnit cu = fact.newClass("MyTest");
 ASTClassType myiface = (ASTInterfaceType)cu.getType();
 // ... add stuff to myiface  ...