class UnsafeImplementationAsMapRule extends AbstractAstVisitorRule
Reports incomplete interface implementations created by map-to-interface coercions. Example: [hasNext: { ... }] as Iterator (Not all Iterator methods are implemented. An UnsupportedOperationException will be thrown upon call to e.g. next().) By default, this rule does not apply to test files.
| Fields inherited from class | Fields |
|---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
| Type | Name and description |
|---|---|
java.lang.Class |
astVisitorClass |
int |
compilerPhase |
java.lang.String |
doNotApplyToFilesMatching |
java.lang.String |
name |
int |
priority |
| Constructor and description |
|---|
UnsafeImplementationAsMapRule
() |
Groovy Documentation