Exception describing the scenario when a SourceVersion enumeration cannot be retrieved due to it not being
available in the current JVM.
This scenario can happen when the compilation is running in a forked mode, where the compilation is being done in a separate JVM, but the annotation processing is done in the build JVM. If the forked JVM is compiling for a more recent SourceVersion that cannot be represented in the JVM that is running the annotation processing, then this exception is thrown.
The actual name of the enumeration that was not found can be retrieved by calling EnumerationNotFoundException.getMessage(). It is in the
format of RELEASE_*
.
public | SourceVersionNotFoundException( Creates a new instance with the specified enum name and the IllegalArgumentException that caused it. |
public SourceVersionNotFoundException(String enumname, IllegalArgumentException cause) throws NullPointerException
Creates a new instance with the specified enum name and the IllegalArgumentException that caused it.
enumnameThe name of the SourceVersion that was not found.
causeThe exception that determined that the enumeration was not found. It is the one thrown by
SourceVersion.valueOf(String) .
NullPointerExceptionIf any of the arguments are
null
.