A javac plugin for extracting a feature graph for plugging into machine learning models
JDK 1.10+
Latest extrator version built from HEAD: https://storage.googleapis.com/features-javac/features-javac-extractor-latest.jar
mvn clean compile package
echo "public class T {}" > T.java
javac -cp extractor/target/features-javac-extractor-1.0.0-SNAPSHOT-jar-with-dependencies.jar -Xplugin:FeaturePlugin T.java
java -jar dot/target/features-javac-dot-1.0.0-SNAPSHOT-jar-with-dependencies.jar -i T.java.proto -o T.java.dot
dot -Tpng T.java.dot > T.java.png
id: 0
type: AST_ELEMENT
contents: "COMPILATION_UNIT"
startPosition: 0
endPosition: 21
startLineNumber: 1
endLineNumber: 2
,
id: 1
type: FAKE_AST
contents: "TYPE_DECLS"
startPosition: 0
endPosition: 21
startLineNumber: 1
endLineNumber: 2
,
id: 2
type: AST_ELEMENT
contents: "CLASS"
startPosition: 0
endPosition: 21
startLineNumber: 1
endLineNumber: 2