|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.neu.ccs.demeter.tools.daj.DAJ
The main DAJ functionality.
Method Summary | |
static int |
compile(String[] args)
Compile a DAJ project. |
static void |
compileAspects(String ajc,
List argList)
Compile a list of aspects. |
static void |
compileStubs(String ajc,
List traversalFiles,
File stubsDirectory,
List aspectFiles,
List AJCOptions,
File destinationDirectory)
Compile the generated stub aspects along with the source aspects. |
static void |
compileTraversals(String ajc,
List traversalFiles,
File traversalsDirectory,
List aspectFiles,
List AJCOptions,
File destinationDirectory)
Compile the generated traversal aspects along with the source aspects. |
static File |
generateClass(ClassGraph cd,
String name,
ClassDef cl,
File gendir)
Generates a Java source ( .java ) file for a class
defined in a class dictionary. |
static void |
generateClass(ClassGraph cd,
String name,
ClassDef cl,
PrintWriter out)
Generate a Java class definition for a class defined in a class dictionary. |
static List |
generateClasses(ClassGraph cd,
String name,
File gendir)
Generates a Java source ( .java ) file for each class
in a class dictionary. |
static File |
generateExpandedClassDictionary(ClassGraph cd,
String name,
File gendir)
Generate an expanded class dictionary ( .xcd ) file
from a class dictionary. |
static void |
generateExpandedClassDictionary(ClassGraph cd,
String name,
PrintWriter out)
Generate an expanded class dictionary ( .xcd ) from a
class dictionary. |
static File |
generateGrammar(ClassGraph cd,
String name,
File gendir)
Generate an ANTLR grammar ( .g ) file from a class
dictionary. |
static void |
generateGrammar(ClassGraph cd,
String name,
PrintWriter out)
Generate an ANTLR grammar from a class dictionary. |
static List |
generateParser(File grammar,
File gendir)
Generate parser and lexer Java files from an ANTLR grammar ( .g ) file. |
static List |
generateParsers(List grammarFiles,
File gendir)
Generate parser and lexer Java files from ANTLR grammar ( .g )
files. |
static File |
generateParsingAspect(ClassGraph cd,
String name,
File gendir)
Generate an AspectJ aspect ( .java ) file for parsing
from a class dictionary. |
static void |
generateParsingAspect(ClassGraph cd,
String name,
PrintWriter out)
Generate an AspectJ aspect definition for parsing from a class dictionary. |
static void |
generateStubs(List traversalFiles,
File destinationDirectory)
Generate a stub aspect file for each traversal file. |
static void |
generateTraversals(List traversalFiles,
File stubClassesDirectory,
boolean generatePrintingAdvice,
File destinationDirectory)
Generate a traversal aspect file for each traversal file. |
static List |
getAspectFiles(List trvFiles,
File gendir)
A list of generated aspect files. |
static List |
getGrammarFiles(List cdFiles,
File gendir)
A list of generated grammar files. |
static void |
main(String[] args)
Compile a DAJ project, then exit the VM. |
static List |
processClassDictionaries(List cds,
File gendir)
|
static List |
processClassDictionary(ClassGraph cd,
String name,
File gendir)
Process a class dictionary. |
static List |
processClassDictionary(File cd,
File gendir)
Process a class dictionary file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void main(String[] args)
args
- command line argumentspublic static int compile(String[] args)
args
- command line arguments
public static List processClassDictionaries(List cds, File gendir) throws ExceptionList
ExceptionList
public static List processClassDictionary(File cd, File gendir) throws IOException, ParseException
.xcd
) file, an ANTLR grammar
(.g
) file, and an AspectJ parsing aspect file.
cd
- a .cd
filegendir
- the output directory for the generated Java files
.java
files
IOException
ParseException
public static List processClassDictionary(ClassGraph cd, String name, File gendir) throws IOException
.xcd
) file, an ANTLR grammar (.g
)
file, and an AspectJ parsing aspect file.
cd
- a class dictionaryname
- the name of the class dictionarygendir
- the output directory for the generated files
.java
files
IOException
public static File generateExpandedClassDictionary(ClassGraph cd, String name, File gendir) throws IOException
.xcd
) file
from a class dictionary.
cd
- a class dictionaryname
- the name of the class dictionarygendir
- the output directory for the generated file
IOException
public static void generateExpandedClassDictionary(ClassGraph cd, String name, PrintWriter out)
.xcd
) from a
class dictionary.
cd
- a class dictionaryname
- the name of the class dictionaryout
- a text output streampublic static File generateGrammar(ClassGraph cd, String name, File gendir) throws IOException
.g
) file from a class
dictionary. The names of the parser and lexer will be based on
the name of the class dictionary, e.g. if name is
Foo
then Foo.g
will contain
FooParser
and FooLexer
.
cd
- a class dictionaryname
- the name of the class dictionarygendir
- the output directory for the generated file
IOException
public static void generateGrammar(ClassGraph cd, String name, PrintWriter out)
Foo
then the output
grammar will contain FooParser
and
FooLexer
.
cd
- a class dictionaryname
- the name of the class dictionaryout
- a text output streampublic static File generateParsingAspect(ClassGraph cd, String name, File gendir) throws IOException
.java
) file for parsing
from a class dictionary. The aspect name, parser name, and lexer
name will be based on the name of the class dictionary, e.g. if
name is Foo
then the aspect will be named
FooParsing
and will refer to FooParser
and FooLexer
.
cd
- a class dictionaryname
- the name of the class dictionarygendir
- the output directory for the generated file
IOException
public static void generateParsingAspect(ClassGraph cd, String name, PrintWriter out)
Foo
then the aspect will be named
FooParsing
and will refer to FooParser
and FooLexer
.
cd
- a class dictionaryname
- the name of the class dictionaryout
- a text output streampublic static List generateClasses(ClassGraph cd, String name, File gendir) throws IOException
.java
) file for each class
in a class dictionary.
cd
- a class dictionaryname
- the name of the class dictionarygendir
- the output directory for the generated files
IOException
public static File generateClass(ClassGraph cd, String name, ClassDef cl, File gendir) throws IOException
.java
) file for a class
defined in a class dictionary.
cd
- a class dictionaryname
- the name of the class dictionarycl
- a class defined in cdgendir
- the output directory for the generated files
IOException
public static void generateClass(ClassGraph cd, String name, ClassDef cl, PrintWriter out)
cd
- a class dictionaryname
- the name of the class dictionarycl
- a class defined in cdout
- a text output streampublic static List generateParsers(List grammarFiles, File gendir) throws Exception
.g
)
files.
grammarFiles
- a list of .g
filesgendir
- the output directory for the generated files
.java
files
Exception
public static List generateParser(File grammar, File gendir) throws Exception
.g
) file.
grammar
- a .g
filegendir
- the output directory for the generated files
.java
files
Exception
public static void generateStubs(List traversalFiles, File destinationDirectory) throws ExceptionList
traversalFiles
- a list of .trv
filesdestinationDirectory
- the output directory for the stubs
ExceptionList
public static void compileStubs(String ajc, List traversalFiles, File stubsDirectory, List aspectFiles, List AJCOptions, File destinationDirectory) throws Exception
ajc
- the aspect compiler executable, or null to invoke ajc on the
class pathtraversalFiles
- a list of .trv
filesstubsDirectory
- the directory the stubs were generated intoaspectFiles
- a list of aspect source filesAJCOptions
- a list of options for the aspect compilerdestinationDirectory
- the output directory for the class files
Exception
public static void generateTraversals(List traversalFiles, File stubClassesDirectory, boolean generatePrintingAdvice, File destinationDirectory) throws Exception
traversalFiles
- a list of .trv
filesstubClassesDirectory
- the directory the stubs were compiled intogeneratePrintingAdvice
- should printing advice be generated?destinationDirectory
- the output directory for the traversal aspects
Exception
public static void compileTraversals(String ajc, List traversalFiles, File traversalsDirectory, List aspectFiles, List AJCOptions, File destinationDirectory) throws Exception
ajc
- the aspect compiler executable, or null to invoke ajc on the
class pathtraversalFiles
- a list of .trv
filestraversalsDirectory
- the directory the traversal aspects were
generated intoaspectFiles
- a list of aspect source filesAJCOptions
- a list of options for the aspect compilerdestinationDirectory
- the output directory for the class files
Exception
public static void compileAspects(String ajc, List argList) throws Exception
ajc
- the aspect compiler executable, or null to invoke ajc on the
class pathargList
- the command line arguments to the aspect compiler
Exception
public static List getGrammarFiles(List cdFiles, File gendir)
cdFiles
- a list of .cd
filesgendir
- the output directory for generated files
.g
filespublic static List getAspectFiles(List trvFiles, File gendir)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |