Class CodeModel

java.lang.Object
de.firemage.autograder.core.CodeModel
All Implemented Interfaces:
AutoCloseable

public final class CodeModel extends Object implements AutoCloseable
The model is build lazily to work better with the multithreaded core architecture.
  • Method Details

    • buildFor

      public static CodeModel buildFor(SourceInfo file, Path jar, ClassLoader classLoader)
    • ensureModelBuild

      public void ensureModelBuild()
    • getFactory

      public spoon.reflect.factory.Factory getFactory()
    • getModel

      public spoon.reflect.CtModel getModel()
    • processWith

      public <E extends spoon.reflect.declaration.CtElement> void processWith(spoon.processing.Processor<E> processor)
    • findMain

      public spoon.reflect.declaration.CtMethod<Void> findMain()
    • hasMainMethod

      public boolean hasMainMethod()
      Checks if the code has a main method.
      Returns:
      true if it has, false otherwise
    • getBasePackage

      public spoon.reflect.declaration.CtPackage getBasePackage()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException