Package eu.solven.cleanthat.rules
Class OptionalNotEmpty
- java.lang.Object
-
- eu.solven.cleanthat.rules.AJavaParserRule
-
- eu.solven.cleanthat.rules.OptionalNotEmpty
-
- All Implemented Interfaces:
IClassTransformer
,IRuleExternalUrls
public class OptionalNotEmpty extends AJavaParserRule implements IClassTransformer
Prefer 'o.isPresent()' over 'o.isEmpty() == 0'- Author:
- Benoit Lacelle
-
-
Constructor Summary
Constructors Constructor Description OptionalNotEmpty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
String
minimalJavaVersion()
protected boolean
processNotRecursively(com.github.javaparser.ast.Node node)
-
Methods inherited from class eu.solven.cleanthat.rules.AJavaParserRule
getThreadJavaParser, onMethodName, optResolvedType, replaceNode, tryReplace, walkNode
-
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.rules.meta.IClassTransformer
getCheckstyleId, getIds, getPmdId, isProductionReady, walkNode
-
Methods inherited from interface eu.solven.cleanthat.rules.meta.IRuleExternalUrls
checkstyleUrl, jsparrowUrl, pmdUrl, sonarUrl
-
-
-
-
Method Detail
-
minimalJavaVersion
public String minimalJavaVersion()
- Specified by:
minimalJavaVersion
in interfaceIClassTransformer
-
getId
public String getId()
- Specified by:
getId
in interfaceIClassTransformer
-
processNotRecursively
protected boolean processNotRecursively(com.github.javaparser.ast.Node node)
- Overrides:
processNotRecursively
in classAJavaParserRule
-
-