Package com.karuslabs.elementary.junit
Class JavacExtension
java.lang.Object
com.karuslabs.elementary.junit.JavacExtension
- All Implemented Interfaces:
Extension,ParameterResolver
A JUnit extension that compiles Java source files specified by
@Classpath,
@Inline, @Introspect and @Resource annotations on the
test class and method. Results of the compilation may be obtained by specifying
Results as a test method parameter. The only constructor and method parameter
that this extension supports is Results.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveParameter(ParameterContext parameter, ExtensionContext context) booleansupportsParameter(ParameterContext parameter, ExtensionContext context) Tests if a parameter is aResults.
-
Constructor Details
-
JavacExtension
public JavacExtension()
-
-
Method Details
-
resolveParameter
public Object resolveParameter(ParameterContext parameter, ExtensionContext context) throws ParameterResolutionException - Specified by:
resolveParameterin interfaceParameterResolver- Throws:
ParameterResolutionException
-
supportsParameter
Tests if a parameter is aResults.- Specified by:
supportsParameterin interfaceParameterResolver- Parameters:
parameter- the parameter's contextcontext- this extension's context- Returns:
trueif the parameter is aResults; otherwisefalse
-