Class JUnit4ToJUnit5
- java.lang.Object
-
- eu.solven.cleanthat.language.java.rules.AJavaParserRule
-
- eu.solven.cleanthat.language.java.rules.mutators.JUnit4ToJUnit5
-
- All Implemented Interfaces:
IClassTransformer
,IRuleExternalUrls
public class JUnit4ToJUnit5 extends AJavaParserRule implements IClassTransformer
Migrate from JUnit4 to JUnit5/Jupiter- Author:
- Benoit Lacelle
-
-
Constructor Summary
Constructors Constructor Description JUnit4ToJUnit5()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
boolean
isJreOnly()
String
minimalJavaVersion()
protected boolean
processAnnotation(com.github.javaparser.ast.expr.AnnotationExpr annotation)
protected boolean
processNotRecursively(com.github.javaparser.ast.Node node)
boolean
walkNode(com.github.javaparser.ast.Node tree)
-
Methods inherited from class eu.solven.cleanthat.language.java.rules.AJavaParserRule
getThreadJavaParser, onMethodName, optResolvedType, replaceNode, tryReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface eu.solven.cleanthat.language.java.rules.meta.IClassTransformer
getCheckstyleId, getIds, getPmdId, isProductionReady
-
Methods inherited from interface eu.solven.cleanthat.language.java.rules.meta.IRuleExternalUrls
checkstyleUrl, jsparrowUrl, pmdUrl, sonarUrl
-
-
-
-
Method Detail
-
minimalJavaVersion
public String minimalJavaVersion()
- Specified by:
minimalJavaVersion
in interfaceIClassTransformer
- Returns:
- the minimal JDK for which this rule is applicable. For instance, any rule related with diamond operator requires JDK1.5
-
getId
public String getId()
- Specified by:
getId
in interfaceIClassTransformer
-
isJreOnly
public boolean isJreOnly()
- Specified by:
isJreOnly
in interfaceIClassTransformer
- Returns:
- true if this rule process only jre standard classes
-
walkNode
public boolean walkNode(com.github.javaparser.ast.Node tree)
- Specified by:
walkNode
in interfaceIClassTransformer
- Overrides:
walkNode
in classAJavaParserRule
- Returns:
- true if the AST has been modified.
-
processNotRecursively
protected boolean processNotRecursively(com.github.javaparser.ast.Node node)
- Overrides:
processNotRecursively
in classAJavaParserRule
-
processAnnotation
protected boolean processAnnotation(com.github.javaparser.ast.expr.AnnotationExpr annotation)
-
-