This repository contains a modified version of Shy to support compilation from command line.
Now you have Library.jar as a library of Shy. The latest version can be found under the root directory.
To compile a java file which includes the "@Algebra" annotation, simply use this command:
javac -cp Library.jar -proc:only *.java
Or you can remove "-proc:only" if you want to have subsequent compilation for generated code.
Note that you shouldn't put that java file under a default(unnamed) package. The file is expected to have a certain package name so that the generated classes can easily import the object algebra interface.
-
/Shy/src/com/zewei/annotation/processor/AlgebraProcessor.java: When specifying file paths, "/" works in Eclipse but fails in command line compilation with a FilerException. Now "." is used instead.
-
/Shy/src/com/zewei/annotation/processor/DeclaredTypeVisitor.java: The method DeclaredTypeVisitor.visitDeclared is slightly modified to ensure correctness in command line compilation.